projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46bd638
)
add NULL ptr check in emit_cond()
author
Brian
<brian@yutani.localnet.net>
Sat, 10 Mar 2007 17:37:18 +0000
(10:37 -0700)
committer
Brian
<brian@yutani.localnet.net>
Sat, 10 Mar 2007 17:37:18 +0000
(10:37 -0700)
src/mesa/shader/slang/slang_emit.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/slang/slang_emit.c
b/src/mesa/shader/slang/slang_emit.c
index 8ad61d8a3b0302824692dc9d8ce5a154793cf332..6d39354d755b75f8a6fb8d7117fa34e32bf65b4d 100644
(file)
--- a/
src/mesa/shader/slang/slang_emit.c
+++ b/
src/mesa/shader/slang/slang_emit.c
@@
-1014,8
+1014,12
@@
emit_cond(slang_emit_info *emitInfo, slang_ir_node *n)
* Need to update condition code register.
* Next instruction is typically an IR_IF.
*/
- /* last child expr instruction: */
- struct prog_instruction *inst = emit(emitInfo, n->Children[0]);
+ struct prog_instruction *inst;
+
+ if (!n->Children[0])
+ return NULL;
+
+ inst = emit(emitInfo, n->Children[0]);
if (inst) {
/* set inst's CondUpdate flag */
inst->CondUpdate = GL_TRUE;