summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-07-29 17:27:44 -0600
committerBrian Paul <[email protected]>2008-07-29 17:27:44 -0600
commit91e1918f484b698016ca43bafdf4fddf2648cca5 (patch)
tree6e51479464d70e9c54c625c247d49fc94d6fa193 /src
parent6f1abb9c215583d11980294f7469da41ec14b7da (diff)
mesa: glsl: added null ptr check
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_compile_struct.c3
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 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);
}