From: Brian Paul Date: Tue, 29 Jul 2008 23:27:44 +0000 (-0600) Subject: mesa: glsl: added null ptr check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91e1918f484b698016ca43bafdf4fddf2648cca5;p=mesa.git mesa: glsl: added null ptr check --- diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 96bdb1f4910..063db37709b 100644 --- a/src/mesa/shader/slang/slang_compile_struct.c +++ b/src/mesa/shader/slang/slang_compile_struct.c @@ -124,7 +124,8 @@ slang_struct_destruct(slang_struct * stru) { slang_variable_scope_destruct(stru->fields); _slang_free(stru->fields); - slang_struct_scope_destruct(stru->structs); + if (stru->structs) + slang_struct_scope_destruct(stru->structs); _slang_free(stru->structs); }