From: Marta Lofstedt Date: Tue, 23 Jun 2015 11:03:13 +0000 (+0200) Subject: mesa: NULL check InfoLog X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0508861f29f2d3b79fb803353e4ea8ab32654bc4;p=mesa.git mesa: NULL check InfoLog 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 Reviewed-by: Anuj Phogat Reviewed-by: Matt Turner --- diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 5b28a2caf3c..f9a7d130f9c 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2033,8 +2033,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);