diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-09-28 18:39:36 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-09-28 18:39:36 +0300 |
commit | 41f1d0b66775aa817c42dc482e6654d5a3d6860f (patch) | |
tree | 21b81be162b885d09cc078b36512477ac2f25a63 /indra | |
parent | 51bb369a39142ff5049f753099f9638ce68b95dc (diff) |
MAINT-6123 Fix for LLTextureCache::writeToFastCache crash
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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<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 ; |