From 0f0db0bf2aa109d2a5353ebeb208de30cb5e61c1 Mon Sep 17 00:00:00 2001 From: Chad Versace Reply-To: Chad Versace Date: Mon, 8 Nov 2010 17:30:13 -0800 Subject: [PATCH] glsl: Fix ir_expression::constant_expression_value() When the type of the ir_expression is error_type, return NULL. This fixes bug 31371. --- src/glsl/ir_constant_expression.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 048c020..1878e6a 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; -- 1.7.1