Module: Mesa
Branch: master
Commit: 5cf156c6b42c03391429ef08542363f7574fd0c9
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5cf156c6b42c03391429ef08542363f7574fd0c9

Author: Timothy Arceri <[email protected]>
Date:   Tue Jul 14 23:30:27 2015 +1000

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]>

---

 src/glsl/ir_constant_expression.cpp |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/glsl/ir_constant_expression.cpp 
b/src/glsl/ir_constant_expression.cpp
index 5bf5ce5..f02e959 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) {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to