aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_constant_expression.cpp
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2015-07-14 23:30:27 +1000
committerTimothy Arceri <[email protected]>2016-01-08 09:12:45 +1100
commit5cf156c6b42c03391429ef08542363f7574fd0c9 (patch)
tree77bcff3b254c5399205db5b3c1e4bfa125dbb7b2 /src/glsl/ir_constant_expression.cpp
parent051603efd546efea9975a5109910171a2e7853a4 (diff)
glsl: replace null check with assert
This was added in 54f583a20 since then error handling has improved. The test this was added to fix now fails earlier since 01822706ec Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/ir_constant_expression.cpp')
-rw-r--r--src/glsl/ir_constant_expression.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 5bf5ce54f78..f02e959bd18 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -1824,9 +1824,7 @@ ir_swizzle::constant_expression_value(struct hash_table *variable_context)
ir_constant *
ir_dereference_variable::constant_expression_value(struct hash_table *variable_context)
{
- /* This may occur during compile and var->type is glsl_type::error_type */
- if (!var)
- return NULL;
+ assert(var);
/* Give priority to the context hashtable, if it exists */
if (variable_context) {