diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2016-10-07 19:35:50 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2016-10-07 19:35:50 +0300 |
| commit | 5dd97bc2bd4924b0342068e697b5d45165225b76 (patch) | |
| tree | ac972b537711057a0f824db8fde6274d0228c872 /indra/newview | |
| parent | bfb8eaabe801a41af2eab903e348669414e90814 (diff) | |
| parent | 028fd679296cd241e7dd0aac3e1c33480a9d3c2c (diff) | |
Merged in andreyl_productengine/viewer-bear-marchcat (pull request #20)
Fixes for two image loading crashes
Diffstat (limited to 'indra/newview')
| -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 ; |
