diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-29 17:27:44 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-07-29 17:27:44 -0600 |
commit | 91e1918f484b698016ca43bafdf4fddf2648cca5 (patch) | |
tree | 6e51479464d70e9c54c625c247d49fc94d6fa193 /src | |
parent | 6f1abb9c215583d11980294f7469da41ec14b7da (diff) |
mesa: glsl: added null ptr check
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/shader/slang/slang_compile_struct.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |