summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/slang/slang_emit.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-26 15:46:35 -0600
committerBrian <[email protected]>2007-03-26 15:46:35 -0600
commit52cc32378c541261d045f160a14ab0cfd27009ad (patch)
treeee45387ffbe0fdb20ee7ea43e4b6f649f3261caa /src/mesa/shader/slang/slang_emit.c
parentc3da0bd7dde9febf206efac88bb67e98dfc90baa (diff)
Additional error checking for 'return' statements.
Diffstat (limited to 'src/mesa/shader/slang/slang_emit.c')
-rw-r--r--src/mesa/shader/slang/slang_emit.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 77470aca154..6507cde0c17 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -793,11 +793,12 @@ emit_move(slang_emit_info *emitInfo, slang_ir_node *n)
assert(n->Children[1]);
inst = emit(emitInfo, n->Children[1]);
+ if (!n->Children[1]->Store) {
+ slang_info_log_error(emitInfo->log, "invalid assignment");
+ return NULL;
+ }
assert(n->Children[1]->Store->Index >= 0);
-#if 0
- assert(!n->Store);
-#endif
n->Store = n->Children[0]->Store;
#if PEEPHOLE_OPTIMIZATIONS