fix potential crash if item doesn't exist in inventory

master
chanayane 2025-05-07 22:14:29 +02:00
parent 91abe3643d
commit 4cc13c102d
No known key found for this signature in database
GPG Key ID: F60C8AE3A90228FA
1 changed files with 7 additions and 0 deletions

View File

@ -999,6 +999,13 @@ void AOEngine::playAnimation(const LLUUID& animation)
}
LLViewerInventoryItem* item = gInventory.getItem(animation);
if (!item)
{
LL_WARNS("AOEngine") << "Inventory item for animation " << animation << " not found." << LL_ENDL;
return;
}
AOSet::AOAnimation anim;
anim.mName = item->LLInventoryItem::getName();
anim.mInventoryUUID = item->getUUID();