summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-27 00:08:14 -0800
committerVinson Lee <vlee@vmware.com>2010-02-27 00:08:14 -0800
commitfd29be3831a583a1ad1d7055bd234724ce7ccfae (patch)
treeb99eb8e100a584c3e4c2e1e44a25426bd7d322d7 /src/mesa/shader
parentbe97d2c0a6269e297f1db0e3639b0b03a45f21d9 (diff)
glsl: Assert pointer is not null before dereferencing.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index adfea890b3..9ca5c1372d 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -3184,6 +3184,7 @@ _slang_unroll_for_loop(slang_assemble_ctx * A, const slang_operation *oper)
varId = oper->children[0].children[0].a_id;
var = _slang_variable_locate(oper->children[0].children[0].locals,
varId, GL_TRUE);
+ assert(var);
start = (GLint) var->initializer->literal[0];
}
else {