From 189b71699f082d7852e7d79e25349913cb2d2119 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 18 Oct 2010 17:45:55 -0500 Subject: Turn assertion around cache loading into an early out. --- indra/newview/llviewerregion.cpp | 35 +++++++++++++++++++---------------- 1 file 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; } -- cgit v1.2.3