summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-06-15 12:54:28 +0000
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2018-06-15 12:54:28 +0000
commit374cebfa876000e2301831f306bf4ee3689a93ea (patch)
treef2f9c27b77353a0e97d2b936462d68dcec806005 /indra/newview
parent03d11d6783f8ded24ced018124c27f9207769854 (diff)
parent6c231ba8a645b70e98b25e0d9ac6cc835fdd2f19 (diff)
Merged pull request #635
MAINT-8395 Rollback part of SL-711 to fix related crashes
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltexturecache.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 2a0d961952..dd5dce3279 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -2027,13 +2027,15 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
if(w * h *c > 0) //valid
{
//make a duplicate to keep the original raw image untouched.
- raw = raw->scaled(w, h);
+ raw = raw->duplicate();
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
+ raw->scale(w, h);
+
discardlevel += i ;
}
}