glsl: Move assert from outside to inside of _slang_gen_swizzle function.
authorVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 01:01:25 +0000 (17:01 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 28 Feb 2010 01:01:25 +0000 (17:01 -0800)
src/mesa/shader/slang/slang_codegen.c

index 9ca5c1372d8a2c283846009d91d5ac8a0495c3a6..6d1cea28a7f814308ca2144dd07419920e3f15cd 100644 (file)
@@ -4223,6 +4223,7 @@ _slang_gen_swizzle(slang_ir_node *child, GLuint swizzle)
       n->Store = _slang_new_ir_storage_relative(0,
                                                 swizzle_size(swizzle),
                                                 child->Store);
+      assert(n->Store);
       n->Store->Swizzle = swizzle;
    }
    return n;
@@ -4524,7 +4525,6 @@ _slang_gen_array_element(slang_assemble_ctx * A, slang_operation *oper)
                                         SWIZZLE_NIL);
          n = _slang_gen_swizzle(n, swizzle);
       }
-      assert(n->Store);
       return n;
    }
    else {