mesa: Correct backwards NULL check.
authorMatt Turner <mattst88@gmail.com>
Sat, 28 Feb 2015 19:14:02 +0000 (11:14 -0800)
committerMatt Turner <mattst88@gmail.com>
Mon, 2 Mar 2015 18:24:33 +0000 (10:24 -0800)
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/shaderapi.c

index dd536cd07d24a90227ead1012526b12393582a10..5731d581a9d3e06bbba5c7ad5f0e60877d54e82f 100644 (file)
@@ -1739,7 +1739,7 @@ _mesa_GetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length,
     * Ensure that length always points to valid storage to avoid multiple NULL
     * pointer checks below.
     */
-   if (length != NULL)
+   if (length == NULL)
       length = &length_dummy;