Fixed NULL pointer access when linking without both a vertex and pixel shader.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 29 May 2012 03:20:28 -0400
changeset 1105 57e255c3b243
parent 1104 9147482e1ec7
child 1106 2bef26cc20f9
Fixed NULL pointer access when linking without both a vertex and pixel shader.
mojoshader_opengl.c
--- a/mojoshader_opengl.c	Tue May 29 02:43:24 2012 -0400
+++ b/mojoshader_opengl.c	Tue May 29 03:20:28 2012 -0400
@@ -1667,6 +1667,9 @@
 static void lookup_outputs(MOJOSHADER_glProgram *program,
                            MOJOSHADER_glShader *shader)
 {
+    if (shader == NULL)
+        return;
+
     const MOJOSHADER_parseData *pd = shader->parseData;
     int i;