aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2010-11-08 17:30:13 -0800
committerKenneth Graunke <[email protected]>2010-11-09 00:50:54 -0800
commitb62c1c4595551c4936323135224a5ea686ba972a (patch)
tree6d5abd07ed67896faf195e693e9c5c77535a8767 /src/glsl/ir_constant_expression.cpp
parentd7855ee3323e8493f139af70db9d0cdb853c2a08 (diff)
glsl: Fix ir_expression::constant_expression_value()
When the type of the ir_expression is error_type, return NULL. This fixes bug 31371.
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r--src/glsl/ir_constant_expression.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 048c020c835..ce13a06ff4f 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -54,6 +54,9 @@ dot(ir_constant *op0, ir_constant *op1)
ir_constant *
ir_expression::constant_expression_value()
{
+ if (this->type->is_error())
+ return NULL;
+
ir_constant *op[2] = { NULL, NULL };
ir_constant_data data;