summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-10 04:03:55 +0100
committerMichal Krol <michal@vmware.com>2009-11-10 04:03:55 +0100
commitcc470bf0ca65592b834c31c662fc795fb7acc58c (patch)
treed1bcbc6c658c86735d906cfc1ff239c6d8b2edbc
parentb2a29ad3092c17f9a7d75ab123ec5c4619c87ec3 (diff)
slang: Check return value from new_instruction().
-rw-r--r--src/mesa/shader/slang/slang_emit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index d4a61dcd490..5eabe615b93 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1254,7 +1254,9 @@ emit_return(slang_emit_info *emitInfo, slang_ir_node *n)
assert(n->Opcode == IR_RETURN);
assert(n->Label);
inst = new_instruction(emitInfo, OPCODE_RET);
- inst->DstReg.CondMask = COND_TR; /* always return */
+ if (inst) {
+ inst->DstReg.CondMask = COND_TR; /* always return */
+ }
return inst;
}