diff options
author | Matt Turner <[email protected]> | 2015-04-01 10:24:26 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-04-01 12:25:29 -0700 |
commit | 3384179faab0456f93f4a5c62ce05305ff20fe5c (patch) | |
tree | 73e166c86a7bbf28cc4354a3a15faa37fa8066dd /src/glsl/opt_algebraic.cpp | |
parent | 142909f19ddeae7237acbb98b47e9228533e58f0 (diff) |
glsl: Make sure not to dereference NULL.
Found by Coverity.
Diffstat (limited to 'src/glsl/opt_algebraic.cpp')
-rw-r--r-- | src/glsl/opt_algebraic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp index a940d2f1cd4..3d2f2ca0bab 100644 --- a/src/glsl/opt_algebraic.cpp +++ b/src/glsl/opt_algebraic.cpp @@ -574,6 +574,8 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) continue; ir_expression *add_expr = floor_expr->operands[0]->as_expression(); + if (!add_expr) + continue; for (int j = 0; j < 2; j++) { ir_expression *abs_expr = add_expr->operands[j]->as_expression(); |