MAINT-861 Fix for crash on exit due to bad matrix mode

master
Dave Parks 2012-04-13 15:47:44 -05:00
parent 6a0eaab160
commit 1de63bec50
1 changed files with 5 additions and 3 deletions

View File

@ -416,12 +416,14 @@ void LLTexUnit::unbind(eTextureType type)
if (mIndex < 0) return;
//always flush and activate for consistency
// some code paths assume unbind always flushes and sets the active texture
gGL.flush();
activate();
// Disabled caching of binding state.
if (mCurrTexType == type)
{
gGL.flush();
activate();
mCurrTexture = 0;
if (LLGLSLShader::sNoFixedFunction && type == LLTexUnit::TT_TEXTURE)
{