Fix Mac startup crash on unbind cube map if RenderDebugGL is on

meow-7.2.2
Graham Madarasz (Graham Linden) 2013-04-01 13:27:25 -07:00
parent 4bbb21ec2d
commit 7c242dae73
1 changed files with 2 additions and 3 deletions

View File

@ -449,9 +449,6 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
LLCubeMap* cube_map = gSky.mVOSkyp ? gSky.mVOSkyp->getCubeMap() : NULL;
if( cube_map )
{
cube_map->disable();
cube_map->restoreMatrix();
if (!invisible && shader_level > 1)
{
shader->disableTexture(LLViewerShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
@ -464,6 +461,8 @@ void LLDrawPoolBump::unbindCubeMap(LLGLSLShader* shader, S32 shader_level, S32&
}
}
}
cube_map->disable();
cube_map->restoreMatrix();
}
if (!LLGLSLShader::sNoFixedFunction)