summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-08-12 15:57:54 -0600
committerBrian Paul <brianp@vmware.com>2010-08-12 16:00:01 -0600
commit2d83e3fa0de6e0b39307cdc67725ca88855d68d2 (patch)
tree20f1fc1434ae8367346f382ab6c41e0ac03a1b85 /src/mesa
parent4ca4edd20e10415d7aabcf2ba6ca89e9401854ef (diff)
mesa: check for null shader->InfoLog before printing
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_print.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index 1ce1bf2f4e..95db9b0eb3 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");