From c7b9b9e02cb771a082c33e073810791ed3158aeb Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Wed, 17 Apr 2013 09:19:08 -0700 Subject: NORSPEC-133 More NULL shader pointer crash suppression --- indra/newview/lldrawpoolalpha.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index f65bbc9799..70168c53c0 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -487,14 +487,13 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) current_shader = NULL; } - if (params.mMaterial.notNull() && current_shader == simple_shader) + if (params.mMaterial.notNull() && current_shader && (current_shader == simple_shader)) { // I apologize in advance for not giving this its own shader. // We have a material. Supply the appropriate data here. if (LLPipeline::sRenderDeferred) { - current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]); - + current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]); current_shader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, params.mEnvIntensity); if (params.mNormalMap) @@ -515,6 +514,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask) current_shader->bindTexture(LLShaderMgr::SPECULAR_MAP, LLViewerFetchedTexture::sWhiteImagep); } } + } else if (LLPipeline::sRenderDeferred && current_shader && (current_shader == simple_shader)) { current_shader->uniform4f(LLShaderMgr::SPECULAR_COLOR, 1.0f, 1.0f, 1.0f, 1.0f); -- cgit v1.2.3