summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-04-17 09:19:08 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-04-17 09:19:08 -0700
commitc7b9b9e02cb771a082c33e073810791ed3158aeb (patch)
treea689f377dde085cdc0ea740eb1c26ca2d7010ff0
parente40bcc4e16c8baeb3945e89c5d035d89416896e3 (diff)
NORSPEC-133 More NULL shader pointer crash suppression
-rw-r--r--indra/newview/lldrawpoolalpha.cpp6
1 files 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);