summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-04-13 15:47:44 -0500
committerDave Parks <davep@lindenlab.com>2012-04-13 15:47:44 -0500
commit1de63bec5089e64b1bf6bc7eaad95d5210f0fd05 (patch)
treefe61fc339ad33aada710c65864686953df0eb471 /indra/llrender
parent6a0eaab160474ea747a33aea107fc3a400bece07 (diff)
MAINT-861 Fix for crash on exit due to bad matrix mode
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llrender.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index b0ddacbb05..51f45ca91e 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -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)
{