summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-07 21:11:47 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-10-07 21:11:47 +0300
commitd66cd019b30ec6ab519fa0ea0c76c1beb99be74c (patch)
tree86d78b577080eb4dd29575f487776bde13914de7 /indra/newview/lltexturecache.cpp
parent752613c433751ca90e13a1d3c77e8df55308e246 (diff)
parent5dd97bc2bd4924b0342068e697b5d45165225b76 (diff)
Merged in lindenlab/viewer-bear
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r--indra/newview/lltexturecache.cpp6
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 ;