#4583 Crash on LLInventoryPanel::itemChanged

meow-7.2.2
Andrey Kleshchev 2025-08-20 20:43:10 +03:00 committed by Andrey Kleshchev
parent 143de1ddbf
commit a27acaf356
1 changed files with 4 additions and 2 deletions

View File

@ -770,6 +770,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
// Remove the item's UI.
LLFolderViewFolder* parent = view_item->getParentFolder();
removeItemID(viewmodel_item->getUUID());
bool was_favorite = view_item->isFavorite();
view_item->destroyView();
if(parent)
{
@ -783,7 +784,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
updateFolderLabel(viewmodel_folder->getUUID());
}
}
if (view_item->isFavorite())
if (was_favorite)
{
parent->updateHasFavorites(false); // favorite was removed
}
@ -2452,6 +2453,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
{
removeItemID(viewmodel_item->getUUID());
}
bool was_favorite = view_item->isFavorite();
view_item->destroyView();
if (parent)
{
@ -2461,7 +2463,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
{
updateFolderLabel(viewmodel_folder->getUUID());
}
if (view_item->isFavorite())
if (was_favorite)
{
parent->updateHasFavorites(false); // favorite was removed
}