glsl2: Don't try to construct an ir_assignment with an invalid LHS
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 3 Aug 2010 22:02:35 +0000 (15:02 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 4 Aug 2010 23:47:27 +0000 (16:47 -0700)
src/glsl/ast_to_hir.cpp

index b65a323a8d785e7ef2e70aefecf795c4cace91d8..14c528075bba0c81370dac1fb0eddab11b3b8f21 100644 (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);
 }