summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index f6e5e95..a613334 100644
--- a/main.cpp
+++ b/main.cpp
@@ -118,6 +118,7 @@ compile_shader(struct glsl_shader *shader)
state.scanner = NULL;
state.translation_unit.make_empty();
state.symbols = new glsl_symbol_table;
+ state.info_log = talloc_strdup(shader, "");
state.error = false;
state.temp_index = 0;
state.loop_or_switch_nesting = NULL;
@@ -164,6 +165,12 @@ compile_shader(struct glsl_shader *shader)
shader->symbols = state.symbols;
shader->CompileStatus = !state.error;
+
+ if (shader->InfoLog)
+ talloc_free(shader->InfoLog);
+
+ shader->InfoLog = state.info_log;
+
return;
}