diff options
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 63b416c51d..233c1ab5fe 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -826,10 +826,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() @@ -2462,7 +2469,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); @@ -2482,7 +2492,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; |