summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2010-04-01 11:39:01 -0600
committerXiaohong Bao <bao@lindenlab.com>2010-04-01 11:39:01 -0600
commit309d94452b43361e13c599c1d14b706a3c46aad6 (patch)
tree885b55d9068d0d6b4b04a23422d12e31d0d96ecd /indra
parent990011f3d68b46ec43218800328d810bd153495a (diff)
fix for EXT-6678: crash at LLTextureCache::openAndReadEntry [secondlife-bin lltexturecache.cpp:1111]
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltexturecache.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp
index 08bc8220d9..651070a2ea 100644
--- a/indra/newview/lltexturecache.cpp
+++ b/indra/newview/lltexturecache.cpp
@@ -1108,7 +1108,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;
}