From: Marta Lofstedt <[email protected]>

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

V3: Chnaged title.

Signed-off-by: Marta Lofstedt <[email protected]>
---
 src/mesa/main/shaderapi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a4296ad..7ea27ed 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1921,7 +1921,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

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to