when profile is compiled out, dont crash later
authorAras Pranckevicius <aras@unity3d.com>
Tue, 29 Dec 2009 22:35:51 +0200
changeset 802 6d1674f192d2
parent 801 6f9625737d41
child 803 cfd14c5f187a
when profile is compiled out, dont crash later
mojoshader.c
--- a/mojoshader.c	Tue Dec 29 22:11:25 2009 +0200
+++ b/mojoshader.c	Tue Dec 29 22:35:51 2009 +0200
@@ -7634,6 +7634,13 @@
     ctx = build_context(profile, tokenbuf, bufsize, swiz, swizcount, m, f, d);
     if (ctx == NULL)
         return &MOJOSHADER_out_of_mem_data;
+	
+    if (isfail(ctx))
+    {
+        retval = build_parsedata(ctx);
+        destroy_context(ctx);
+        return retval;
+    }
 
     verify_swizzles(ctx);