From 91e1918f484b698016ca43bafdf4fddf2648cca5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Jul 2008 17:27:44 -0600 Subject: mesa: glsl: added null ptr check --- src/mesa/shader/slang/slang_compile_struct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/slang/slang_compile_struct.c b/src/mesa/shader/slang/slang_compile_struct.c index 96bdb1f491..063db37709 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); } -- cgit v1.2.3