summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2012-05-04 18:16:37 -0600
committerXiaohong Bao <bao@lindenlab.com>2012-05-04 18:16:37 -0600
commit0afca8603a56205df4c4e310387651726cbfbe3c (patch)
treebdc4d4e536c8256d205b8577093e959b770fd331 /indra/newview/llviewertexture.cpp
parentc143a4f87ee465c797a0fcf06e267bd32b9e52c7 (diff)
fix crashes and flaws for SH-3086
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 684d1afa4f..511fc13973 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -409,7 +409,11 @@ void LLViewerTextureManager::cleanup()
void LLViewerTexture::initClass()
{
LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture() ;
- sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
+
+ if(gSavedSettings.getBOOL("TextureFetchDebuggerEnabled"))
+ {
+ sTexelPixelRatio = gSavedSettings.getF32("TexelPixelRatio");
+ }
}
// static
@@ -2168,7 +2172,10 @@ bool LLViewerFetchedTexture::updateFetch()
void LLViewerFetchedTexture::clearFetchedResults()
{
- llassert_always(!mNeedsCreateTexture && !mIsFetching);
+ if(mNeedsCreateTexture || mIsFetching)
+ {
+ return ;
+ }
cleanup();
destroyGLTexture();