projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
142909f
)
glsl: Make sure not to dereference NULL.
author
Matt Turner
<mattst88@gmail.com>
Wed, 1 Apr 2015 17:24:26 +0000
(10:24 -0700)
committer
Matt Turner
<mattst88@gmail.com>
Wed, 1 Apr 2015 19:25:29 +0000
(12:25 -0700)
Found by Coverity.
src/glsl/opt_algebraic.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/opt_algebraic.cpp
b/src/glsl/opt_algebraic.cpp
index a940d2f1cd4552f1d9094d405c44d8d0415de9b1..3d2f2ca0bab4f28a34223bc6edded3412480549a 100644
(file)
--- 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();