From 5f8283c9fb6e1d9172cc0bd82b6989f96acec4f2 Mon Sep 17 00:00:00 2001 From: rdb Date: Tue, 8 May 2012 19:36:37 +0000 Subject: [PATCH] same fix elsewhere in code --- panda/src/glstuff/glShaderContext_src.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index ccc32fc664..6cabab6cc4 100755 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1126,14 +1126,14 @@ glsl_report_program_errors(GSG *gsg, unsigned int program) { gsg->_glGetProgramiv(program, GL_INFO_LOG_LENGTH, &length); - if (length > 0) { + if (length > 1) { info_log = (char *) malloc(length); gsg->_glGetProgramInfoLog(program, length, &num_chars, info_log); if (strcmp(info_log, "Success.\n") != 0) { GLCAT.error(false) << info_log << "\n"; } + free(info_log); } - delete[] info_log; } ////////////////////////////////////////////////////////////////////