MAINT-6123 Fix for LLTextureCache::writeToFastCache crash

meow-7.2.2
AndreyL ProductEngine 2016-09-28 18:39:36 +03:00
parent 51bb369a39
commit 41f1d0b667
1 changed files with 6 additions and 0 deletions

View File

@ -1928,6 +1928,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
{
//make a duplicate to keep the original raw image untouched.
raw = raw->duplicate();
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
raw->scale(w, h) ;
discardlevel += i ;