Skip to content
Snippets Groups Projects
Commit 41f1d0b6 authored by AndreyL ProductEngine's avatar AndreyL ProductEngine
Browse files

MAINT-6123 Fix for LLTextureCache::writeToFastCache crash

parent 51bb369a
No related branches found
No related tags found
No related merge requests found
...@@ -1928,6 +1928,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis ...@@ -1928,6 +1928,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis
{ {
//make a duplicate to keep the original raw image untouched. //make a duplicate to keep the original raw image untouched.
raw = raw->duplicate(); raw = raw->duplicate();
if (raw->isBufferInvalid())
{
LL_WARNS() << "Invalid image duplicate buffer" << LL_ENDL;
return false;
}
raw->scale(w, h) ; raw->scale(w, h) ;
discardlevel += i ; discardlevel += i ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment