Module: Mesa
Branch: master
Commit: cc470bf0ca65592b834c31c662fc795fb7acc58c
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc470bf0ca65592b834c31c662fc795fb7acc58c

Author: Michal Krol <[email protected]>
Date:   Tue Nov 10 04:03:55 2009 +0100

slang: Check return value from new_instruction().

---

 src/mesa/shader/slang/slang_emit.c |    4 +++-
 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 d4a61dc..5eabe61 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;
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to