mojoshader_opengl.c
changeset 1111 7530b37979b8
parent 1110 91a6af79b5e4
child 1117 f6712bf72c19
--- a/mojoshader_opengl.c	Thu Jun 07 04:31:01 2012 -0400
+++ b/mojoshader_opengl.c	Fri Aug 03 13:39:36 2012 -0400
@@ -2453,7 +2453,8 @@
             // !!! FIXME: set constants that overlap the array.
         } // for
 
-        if (program->texbem_count)
+        assert((!program->texbem_count) || (program->fragment));
+        if ((program->texbem_count) && (program->fragment))
         {
             const MOJOSHADER_parseData *pd = program->fragment->parseData;
             const int samp_count = pd->sampler_count;
@@ -2481,7 +2482,7 @@
             } // for
 
             assert(texbem_count == program->texbem_count);
-        } // for
+        } // if
 
         program->generation = ctx->generation;