glsl2: Don't try to construct an ir_assignment with an invalid LHS

This commit is contained in:
Ian Romanick 2010-08-03 15:02:35 -07:00
parent 8dbdcb0b43
commit 8e9ce2eb56

View file

@ -555,9 +555,8 @@ do_assignment(exec_list *instructions, struct _mesa_glsl_parse_state *state,
NULL));
deref_var = new(ctx) ir_dereference_variable(var);
instructions->push_tail(new(ctx) ir_assignment(lhs,
deref_var,
NULL));
if (!error_emitted)
instructions->push_tail(new(ctx) ir_assignment(lhs, deref_var, NULL));
return new(ctx) ir_dereference_variable(var);
}