diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-04-12 00:12:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 00:12:30 +0300 |
commit | dfbbad813f3a1b9a151db7b25d3657590324ca4c (patch) | |
tree | e31cee85f651a874c4b6edc7491efa0cb2ec93d5 /indra/newview/llviewerregion.cpp | |
parent | 17e1f3692c5c1e9cbc6ba6895b312a8baae9aec2 (diff) | |
parent | d0102af56d3b1d5b1d9bf3c8eb9aeea77028b70e (diff) |
Merge pull request #1204 from Ansariel/DRTVWR-600-maint-A
Merge main into maint-A
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; |