Mesa (7.9): glsl: fix crash in loop analysis when some controls can' t be determined
Ian Romanick
idr at kemper.freedesktop.org
Wed Dec 15 22:06:30 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 6333f1d2246e68688f0f6939ae7bafb8b52d642b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6333f1d2246e68688f0f6939ae7bafb8b52d642b
Author: Aras Pranckevicius <aras at unity3d.com>
Date: Thu Sep 30 12:47:31 2010 +0300
glsl: fix crash in loop analysis when some controls can't be determined
Fixes loop-07.frag.
(cherry picked from commit d67df5dd9db1cede92f1b177c890f83809bb4582)
---
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 =
More information about the mesa-commit
mailing list