Possible fix for texture corruption crash loop

Signed-off-by: Beeks <HgDelirium@gmail.com>
This commit is contained in:
Beeks
2010-09-10 20:03:56 -04:00
parent c86769d657
commit c28d8d0c0a

View File

@@ -1062,6 +1062,13 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry)
if (!mReadOnly)
{
entry.mTime = time(NULL);
if(entry.mImageSize < entry.mBodySize)
{
// Just say no, due to my messing around to cache discards other than 0 we can end up here
// after recalling an image from cache at a lower discard than cached. RC
return;
}
llassert_always(entry.mImageSize == 0 || entry.mImageSize == -1 || entry.mImageSize > entry.mBodySize);
if (entry.mBodySize > 0)
{