diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-01-03 22:37:44 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-01-03 22:37:44 -0700 |
commit | d3b9f446a683f71b0d3a70ecf6e0028a063040e4 (patch) | |
tree | 75699fedc7469bed4f411376d4b76d6e708c6eb0 /indra/newview/llviewertexture.cpp | |
parent | 1d44f4d863217c8e5d18a0073e02e4360bc65e07 (diff) |
fix for MAINT-2147: crash in LLTextureCache::writeToFastCache on OSX
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r-- | indra/newview/llviewertexture.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0d7616dc88..634ff1392e 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -1531,7 +1531,12 @@ void LLViewerFetchedTexture::addToCreateTexture() destroyRawImage(); return ; } - mRawImage->scale(w >> i, h >> i) ; + + { + //make a duplicate in case somebody else is using this raw image + mRawImage = mRawImage->duplicate(); + mRawImage->scale(w >> i, h >> i) ; + } } } } @@ -2899,7 +2904,11 @@ void LLViewerFetchedTexture::setCachedRawImage() --i ; } - mRawImage->scale(w >> i, h >> i) ; + { + //make a duplicate in case somebody else is using this raw image + mRawImage = mRawImage->duplicate(); + mRawImage->scale(w >> i, h >> i) ; + } } mCachedRawImage = mRawImage ; mRawDiscardLevel += i ; |