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/lltexturecache.cpp | |
parent | 1d44f4d863217c8e5d18a0073e02e4360bc65e07 (diff) |
fix for MAINT-2147: crash in LLTextureCache::writeToFastCache on OSX
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 305f6fca0f..102b97de30 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1912,10 +1912,10 @@ bool LLTextureCache::writeToFastCache(S32 id, LLPointer<LLImageRaw> raw, S32 dis h >>= i; if(w * h *c > 0) //valid { - LLPointer<LLImageRaw> newraw = new LLImageRaw(raw->getData(), raw->getWidth(), raw->getHeight(), raw->getComponents()); - newraw->scale(w, h) ; - raw = newraw; - + //make a duplicate to keep the original raw image untouched. + raw = raw->duplicate(); + raw->scale(w, h) ; + discardlevel += i ; } } |