SL-20712 Crash at null cache buffer

master
Andrey Kleshchev 2023-12-12 01:12:15 +02:00 committed by akleshchev
parent 67ee70a6ab
commit 7b3a0d86e2
1 changed files with 5 additions and 2 deletions

View File

@ -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;