diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-04-01 11:39:01 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-04-01 11:39:01 -0600 |
commit | 8dd401e4a12c4ec277b4474cea2ef0824f5c09b8 (patch) | |
tree | 80f44761fa336eb96896f85d677ad43f4d5b3650 | |
parent | 88df86bcc3ed96b727ce408ef79134a910f807b1 (diff) |
fix for EXT-6678: crash at LLTextureCache::openAndReadEntry [secondlife-bin lltexturecache.cpp:1111]
-rw-r--r-- | indra/newview/lltexturecache.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 290ac8dc04..dce7d8da40 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1144,7 +1144,16 @@ S32 LLTextureCache::openAndReadEntry(const LLUUID& id, Entry& entry, bool create { readEntryFromHeaderImmediately(idx, entry) ; } - llassert_always(entry.mImageSize > entry.mBodySize); + if(entry.mImageSize <= entry.mBodySize)//it happens on 64-bit systems, do not know why + { + llwarns << "corrupted entry: " << id << " entry image size: " << entry.mImageSize << " entry body size: " << entry.mBodySize << llendl ; + + //erase this entry and the cached texture from the cache. + std::string tex_filename = getTextureFileName(id); + removeEntry(idx, entry, tex_filename) ; + mUpdatedEntryMap.erase(idx) ; + idx = -1 ; + } } return idx; } |