From ca97bd395f476ad2b5a009f92edef4656aab3650 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Sat, 19 Jun 2010 01:39:14 -0700 Subject: [PATCH] Initialize the shader info log Signed-off-by: Kenneth Graunke --- main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.cpp b/main.cpp index f6e5e95fcbe..a613334d5cd 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; } -- 2.30.2