From: Aras Pranckevicius Date: Thu, 30 Sep 2010 09:47:31 +0000 (+0300) Subject: glsl: fix crash in loop analysis when some controls can't be determined X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d67df5dd9db1cede92f1b177c890f83809bb4582;p=mesa.git glsl: fix crash in loop analysis when some controls can't be determined Fixes loop-07.frag. --- diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp index 2ef3d305254..b528810f40d 100644 --- a/src/glsl/loop_controls.cpp +++ b/src/glsl/loop_controls.cpp @@ -85,6 +85,9 @@ int calculate_iterations(ir_rvalue *from, ir_rvalue *to, ir_rvalue *increment, enum ir_expression_operation op) { + if (from == NULL || to == NULL || increment == NULL) + return -1; + void *mem_ctx = talloc_init("%s", __func__); ir_expression *const sub =