summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index d887a579e4..d51e8a49e6 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -829,10 +829,17 @@ void LLViewerRegion::saveObjectCache()
mCacheDirty = FALSE;
}
- // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
- sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
- mImpl->mCacheMap.clear();
- // TODO - probably need to do the same for overrides cache
+ if (LLAppViewer::instance()->isQuitting())
+ {
+ mImpl->mCacheMap.clear();
+ }
+ else
+ {
+ // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
+ sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
+ mImpl->mCacheMap.clear();
+ // TODO - probably need to do the same for overrides cache
+ }
}
void LLViewerRegion::sendMessage()
@@ -2536,7 +2543,10 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
//set parent id
U32 parent_id = 0;
- LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+ if (entry->getDP()) // NULL if nothing cached
+ {
+ LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+ }
if(parent_id != entry->getParentID())
{
entry->setParentID(parent_id);
@@ -2556,7 +2566,7 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
LLQuaternion rot;
//decode spatial info and parent info
- U32 parent_id = LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot);
+ U32 parent_id = entry->getDP() ? LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot) : entry->getParentID();
U32 old_parent_id = entry->getParentID();
bool same_old_parent = false;