From 644bbf88ec8fe876efda7aa6615f8a89d0101bd0 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 28 Feb 2015 11:14:02 -0800 Subject: [PATCH] mesa: Correct backwards NULL check. Cc: "10.4, 10.5" Reviewed-by: Emil Velikov Reviewed-by: Ian Romanick (cherry picked from commit 491d42135ad0e5670756216154f2ba9fc79d4ba7) --- src/mesa/main/shaderapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 0ca4f58dd51..3e2f8839b86 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1696,7 +1696,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;