diff options
author | Dave Parks <davep@lindenlab.com> | 2010-10-18 17:45:55 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-10-18 17:45:55 -0500 |
commit | 189b71699f082d7852e7d79e25349913cb2d2119 (patch) | |
tree | 4d970d5dbd14ceaafbbf63cae86c9d423ac4fc01 /indra/newview | |
parent | a3c84b5c582293bf54f4b98c36f6398f42c195d2 (diff) |
Turn assertion around cache loading into an early out.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index efaa68db0c..45690c0b8e 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -1070,30 +1070,33 @@ void LLViewerRegion::cacheFullUpdate(LLViewerObject* objectp, LLDataPackerBinary // AND the CRC matches. JC LLDataPacker *LLViewerRegion::getDP(U32 local_id, U32 crc) { - llassert(mCacheLoaded); + //llassert(mCacheLoaded); This assert failes often, changing to early-out -- davep, 2010/10/18 - LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL); - - if (entry) + if (mCacheLoaded) { - // we've seen this object before - if (entry->getCRC() == crc) + LLVOCacheEntry* entry = get_if_there(mCacheMap, local_id, (LLVOCacheEntry*)NULL); + + if (entry) { - // Record a hit - entry->recordHit(); - return entry->getDP(crc); + // we've seen this object before + if (entry->getCRC() == crc) + { + // Record a hit + entry->recordHit(); + return entry->getDP(crc); + } + else + { + // llinfos << "CRC miss for " << local_id << llendl; + mCacheMissCRC.put(local_id); + } } else { - // llinfos << "CRC miss for " << local_id << llendl; - mCacheMissCRC.put(local_id); + // llinfos << "Cache miss for " << local_id << llendl; + mCacheMissFull.put(local_id); } } - else - { - // llinfos << "Cache miss for " << local_id << llendl; - mCacheMissFull.put(local_id); - } return NULL; } |