Fix a nullptr usage.
This commit is contained in:
@@ -446,7 +446,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||||||
llassert_always(!LLGLSLShader::sCurBoundShaderPtr);
|
llassert_always(!LLGLSLShader::sCurBoundShaderPtr);
|
||||||
|
|
||||||
bool fullbright = depth_only || params.mFullbright;
|
bool fullbright = depth_only || params.mFullbright;
|
||||||
if(fullbright == light_enabled || !initialized_lighting)
|
if(fullbright == !!light_enabled || !initialized_lighting)
|
||||||
{
|
{
|
||||||
light_enabled = !fullbright;
|
light_enabled = !fullbright;
|
||||||
initialized_lighting = true;
|
initialized_lighting = true;
|
||||||
@@ -536,7 +536,7 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||||||
if (params.mTexture.notNull())
|
if (params.mTexture.notNull())
|
||||||
{
|
{
|
||||||
params.mTexture->addTextureStats(params.mVSize);
|
params.mTexture->addTextureStats(params.mVSize);
|
||||||
if (mat)
|
if (use_shaders && mat && current_shader)
|
||||||
{
|
{
|
||||||
current_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, params.mTexture);
|
current_shader->bindTexture(LLShaderMgr::DIFFUSE_MAP, params.mTexture);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user