From: Vinson Lee Date: Sat, 27 Feb 2010 08:08:14 +0000 (-0800) Subject: glsl: Assert pointer is not null before dereferencing. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fd29be3831a583a1ad1d7055bd234724ce7ccfae;p=mesa.git glsl: Assert pointer is not null before dereferencing. --- diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index adfea890b3c..9ca5c1372d8 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 {