[Mesa-dev] [PATCH] mesa : NULL check InfoLog

Marta Lofstedt marta.lofstedt at linux.intel.com
Tue Jun 23 04:03:13 PDT 2015


From: Marta Lofstedt <marta.lofstedt at intel.com>

When a program is compiled, but linking failed the
sh->InfoLog could be NULL. This is expoloited
by OpenGL ES 3.1 conformance tests.

Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
---
 src/mesa/main/shaderapi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a4296ad..c783c69 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1920,8 +1920,8 @@ _mesa_create_shader_program(struct gl_context* ctx, GLboolean separate,
 	    }
 #endif
 	 }
-
-	 ralloc_strcat(&shProg->InfoLog, sh->InfoLog);
+         if (sh->InfoLog)
+		    ralloc_strcat(&shProg->InfoLog, sh->InfoLog);
       }
 
       delete_shader(ctx, shader);
-- 
1.9.1



More information about the mesa-dev mailing list