summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/glsl/opt_algebraic.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
index 9b8a426d79c..c4b87151199 100644
--- a/src/glsl/opt_algebraic.cpp
+++ b/src/glsl/opt_algebraic.cpp
@@ -589,7 +589,7 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
continue;
ir_constant *point_five = add_expr->operands[1 - j]->as_constant();
- if (!point_five->is_value(0.5, 0))
+ if (!point_five || !point_five->is_value(0.5, 0))
continue;
if (abs_expr->operands[0]->equals(sign_expr->operands[0])) {