MAINT-8395 Rollback part of SL-711 to fix related crashes

meow-7.2.2
andreykproductengine 2018-06-14 18:30:40 +03:00
parent 5f890af707
commit 6c231ba8a6
1 changed files with 3 additions and 1 deletions

View File

@ -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 ;
}
}