diff options
author | Aras Pranckevicius <aras@unity3d.com> | 2010-09-30 12:47:31 +0300 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-11-11 10:49:37 -0800 |
commit | d67df5dd9db1cede92f1b177c890f83809bb4582 (patch) | |
tree | c2fdb243eb1e27189834be05c3139dfc9b2dbe1f /src/glsl/loop_controls.cpp | |
parent | 7fb16423cc325efcdcf6e4954a5ac71d8f96dbf8 (diff) | |
download | external_mesa3d-d67df5dd9db1cede92f1b177c890f83809bb4582.zip external_mesa3d-d67df5dd9db1cede92f1b177c890f83809bb4582.tar.gz external_mesa3d-d67df5dd9db1cede92f1b177c890f83809bb4582.tar.bz2 |
glsl: fix crash in loop analysis when some controls can't be determined
Fixes loop-07.frag.
Diffstat (limited to 'src/glsl/loop_controls.cpp')
-rw-r--r-- | src/glsl/loop_controls.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/loop_controls.cpp b/src/glsl/loop_controls.cpp index 2ef3d30..b528810 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 = |