Skip to content

Commit a27acaf

Browse files
committed
#4583 Crash on LLInventoryPanel::itemChanged
1 parent 143de1d commit a27acaf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

indra/newview/llinventorypanel.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
770770
// Remove the item's UI.
771771
LLFolderViewFolder* parent = view_item->getParentFolder();
772772
removeItemID(viewmodel_item->getUUID());
773+
bool was_favorite = view_item->isFavorite();
773774
view_item->destroyView();
774775
if(parent)
775776
{
@@ -783,7 +784,7 @@ void LLInventoryPanel::itemChanged(const LLUUID& item_id, U32 mask, const LLInve
783784
updateFolderLabel(viewmodel_folder->getUUID());
784785
}
785786
}
786-
if (view_item->isFavorite())
787+
if (was_favorite)
787788
{
788789
parent->updateHasFavorites(false); // favorite was removed
789790
}
@@ -2452,6 +2453,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
24522453
{
24532454
removeItemID(viewmodel_item->getUUID());
24542455
}
2456+
bool was_favorite = view_item->isFavorite();
24552457
view_item->destroyView();
24562458
if (parent)
24572459
{
@@ -2461,7 +2463,7 @@ bool LLInventoryFavoritesItemsPanel::removeFavorite(const LLUUID& id, const LLIn
24612463
{
24622464
updateFolderLabel(viewmodel_folder->getUUID());
24632465
}
2464-
if (view_item->isFavorite())
2466+
if (was_favorite)
24652467
{
24662468
parent->updateHasFavorites(false); // favorite was removed
24672469
}

0 commit comments

Comments
 (0)