From: Michal Krol Date: Tue, 10 Nov 2009 03:03:55 +0000 (+0100) Subject: slang: Check return value from new_instruction(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc470bf0ca65592b834c31c662fc795fb7acc58c;p=mesa.git slang: Check return value from new_instruction(). --- 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; }