summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 452dcdd8fd..eba7189a82 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()
@@ -1879,8 +1886,6 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
addActiveCacheEntry(entry);
}
- loadCacheMiscExtras(entry->getLocalID());
-
return obj;
}
@@ -2467,7 +2472,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);
@@ -2487,7 +2495,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;
@@ -3655,15 +3663,6 @@ std::string LLViewerRegion::getSimHostName()
return std::string("...");
}
-void LLViewerRegion::loadCacheMiscExtras(U32 local_id)
-{
- auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
- if (iter != mImpl->mGLTFOverridesLLSD.end())
- {
- LLGLTFMaterialList::loadCacheOverrides(iter->second);
- }
-}
-
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;