From 41f1d0b66775aa817c42dc482e6654d5a3d6860f Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 28 Sep 2016 18:39:36 +0300 Subject: MAINT-6123 Fix for LLTextureCache::writeToFastCache crash --- indra/newview/lltexturecache.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'indra/newview/lltexturecache.cpp') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 37cc908e84..36c4f0d516 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1928,6 +1928,12 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer 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 ; -- cgit v1.2.3