Module: Mesa Branch: glsl2 Commit: 2d83e3fa0de6e0b39307cdc67725ca88855d68d2 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d83e3fa0de6e0b39307cdc67725ca88855d68d2
Author: Brian Paul <[email protected]> Date: Thu Aug 12 15:57:54 2010 -0600 mesa: check for null shader->InfoLog before printing --- src/mesa/program/prog_print.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c index 1ce1bf2..95db9b0 100644 --- a/src/mesa/program/prog_print.c +++ b/src/mesa/program/prog_print.c @@ -1032,7 +1032,9 @@ _mesa_write_shader_to_file(const struct gl_shader *shader) fprintf(f, "/* Compile status: %s */\n", shader->CompileStatus ? "ok" : "fail"); fprintf(f, "/* Log Info: */\n"); - fputs(shader->InfoLog, f); + if (shader->InfoLog) { + fputs(shader->InfoLog, f); + } if (shader->CompileStatus && shader->Program) { fprintf(f, "/* GPU code */\n"); fprintf(f, "/*\n"); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
