summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-18 17:45:55 -0500
committerDave Parks <davep@lindenlab.com>2010-10-18 17:45:55 -0500
commit189b71699f082d7852e7d79e25349913cb2d2119 (patch)
tree4d970d5dbd14ceaafbbf63cae86c9d423ac4fc01
parenta3c84b5c582293bf54f4b98c36f6398f42c195d2 (diff)
Turn assertion around cache loading into an early out.
-rw-r--r--indra/newview/llviewerregion.cpp35
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;
}