diff options
author | Graham Madarasz (Graham Linden) <graham@lindenlab.com> | 2013-04-01 13:27:25 -0700 |
---|---|---|
committer | Graham Madarasz (Graham Linden) <graham@lindenlab.com> | 2013-04-01 13:27:25 -0700 |
commit | 7c242dae7349f8a5857b1bde33320f6f37987acf (patch) | |
tree | a4deeae5ba06078b7b65f6727a6bc04630f5431c | |
parent | 4bbb21ec2d8143064887365a43e1b9fbb0800fd3 (diff) |
Fix Mac startup crash on unbind cube map if RenderDebugGL is on
-rw-r--r-- | indra/newview/lldrawpoolbump.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp index 1b0b11298c..8d1db7b9ad 100644 --- a/indra/newview/lldrawpoolbump.cpp +++ b/indra/newview/lldrawpoolbump.cpp @@ -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) |