From bd6c39192b0f29be1fbbbbbc257cd0351e505afb Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 8 Jul 2025 15:21:43 +0800 Subject: Preventing detachment from the inventory panels Part of the @detach= command implementation. --- indra/newview/llappearancemgr.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index e9d455ae53..ee7af8692f 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4160,6 +4160,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nul for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { const LLUUID& id_to_remove = *it; + if (gAgentAvatarp->getWornAttachment(id_to_remove)->isLocked()) return; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLViewerInventoryItem *item = gInventory.getItem(linked_item_id); if (item && item->getType() == LLAssetType::AT_OBJECT) -- cgit v1.2.3 From 2df2f6fcae489b7e5ad90033acf2f7ee82868722 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 8 Jul 2025 20:04:12 +0800 Subject: Correct commit bd6c39192b0f29be1fbbbbbc257cd0351e505afb --- indra/newview/llappearancemgr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ee7af8692f..504582f2d7 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4160,7 +4160,7 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nul for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { const LLUUID& id_to_remove = *it; - if (gAgentAvatarp->getWornAttachment(id_to_remove)->isLocked()) return; + if (gAgentAvatarp->getWornAttachment(id_to_remove)->isLocked()) continue; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLViewerInventoryItem *item = gInventory.getItem(linked_item_id); if (item && item->getType() == LLAssetType::AT_OBJECT) -- cgit v1.2.3 From a9b5563065fa4768072bbe2ffc023cc73675d701 Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Thu, 10 Jul 2025 15:03:55 +0800 Subject: Fix crash from trying to detach alpha --- indra/newview/llappearancemgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappearancemgr.cpp') diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index 504582f2d7..242d407219 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -4160,7 +4160,8 @@ void LLAppearanceMgr::removeItemsFromAvatar(const uuid_vec_t& ids_to_remove, nul for (uuid_vec_t::const_iterator it = ids_to_remove.begin(); it != ids_to_remove.end(); ++it) { const LLUUID& id_to_remove = *it; - if (gAgentAvatarp->getWornAttachment(id_to_remove)->isLocked()) continue; + auto attachment = gAgentAvatarp->getWornAttachment(id_to_remove); + if (attachment && attachment->isLocked()) continue; const LLUUID& linked_item_id = gInventory.getLinkedItemID(id_to_remove); LLViewerInventoryItem *item = gInventory.getItem(linked_item_id); if (item && item->getType() == LLAssetType::AT_OBJECT) -- cgit v1.2.3