summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-20 20:43:10 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-08-20 22:32:42 +0300
commita27acaf35687b60d537f84e92b872680b687b9ea (patch)
tree6f90b38a76bdd834939a3c1732e5830b15505cda /indra
parent143de1ddbf4489c490d16cc8cbf0eca688a81b43 (diff)
#4583 Crash on LLInventoryPanel::itemChanged
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorypanel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index b2dd47548c..590cbbec4e 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -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
}