From 7b3a0d86e2c8ec35f2cd1e5c4991d06ed460dee7 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Tue, 12 Dec 2023 01:12:15 +0200 Subject: SL-20712 Crash at null cache buffer --- indra/newview/llviewerregion.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerregion.cpp') diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 452dcdd8fd..6c0e25ae39 100755 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -2467,7 +2467,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 +2490,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; -- cgit v1.2.3