From 446aa309e18e0c5a6335d7dd9688a4e521d29043 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sat, 28 Feb 2015 11:14:02 -0800 Subject: 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(-) (limited to 'src/mesa/main/shaderapi.c') diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 52eab46551b..dad61f4a656 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -1713,7 +1713,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; -- cgit v1.2.3