mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 14:30:22 +01:00
add NULL ptr check in emit_cond()
This commit is contained in:
parent
46bd63819e
commit
c9872b80c8
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue