diff options
author | Oz Linden <oz@lindenlab.com> | 2013-03-01 17:34:03 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-03-01 17:34:03 -0500 |
commit | 90536f6cdf7fc6039deefb9c528347fa54111af5 (patch) | |
tree | 9901edf3493c0e4992ecd1f3055d3530cb4e6076 /indra/newview | |
parent | 3c65f7fef08c440e65123b727036522d7d51fc6f (diff) |
protect against missing mNormalMap or mSpecularMap
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpoolmaterials.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 52f476f589..f0e1221f15 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -89,11 +89,17 @@ void LLDrawPoolMaterials::renderDeferred(S32 pass) mShader->uniform4f(LLShaderMgr::SPECULAR_COLOR, params.mSpecColor.mV[0], params.mSpecColor.mV[1], params.mSpecColor.mV[2], params.mSpecColor.mV[3]); mShader->uniform1f(LLShaderMgr::ENVIRONMENT_INTENSITY, params.mEnvIntensity); - params.mNormalMap->addTextureStats(params.mVSize); - bindNormalMap(params.mNormalMap); + if (params.mNormalMap) + { + params.mNormalMap->addTextureStats(params.mVSize); + bindNormalMap(params.mNormalMap); + } - params.mSpecularMap->addTextureStats(params.mVSize); - bindSpecularMap(params.mSpecularMap); + if (params.mSpecularMap) + { + params.mSpecularMap->addTextureStats(params.mVSize); + bindSpecularMap(params.mSpecularMap); + } diffuse_channel = mShader->enableTexture(LLShaderMgr::DIFFUSE_MAP); pushBatch(params, VERTEX_DATA_MASK, TRUE); |