summaryrefslogtreecommitdiff
path: root/indra/newview/lltexturecache.cpp
diff options
context:
space:
mode:
authorYuri Chebotarev <ychebotarev@productengine.com>2010-04-07 09:43:14 +0300
committerYuri Chebotarev <ychebotarev@productengine.com>2010-04-07 09:43:14 +0300
commite8e1e87dd5c4f13a041c8d04311399a59447899d (patch)
tree4dc67baeae6ac828654f9d391de63c434a3af41b /indra/newview/lltexturecache.cpp
parent3da3ed2ccb9bab68be113bf7a79e6f95f7b73f9e (diff)
parent3585792e73fcccb391329bb19cf00c049adc15f6 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lltexturecache.cpp')
-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;
}