From 7ff358efc46a07c1ed3bc845c693d67c5eb95b69 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 15 Nov 2023 21:01:05 +0200 Subject: SL-20575 Fixed premature exit --- indra/newview/llinventoryfunctions.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 5d6bf8ab4b..a260b62c69 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -844,21 +844,20 @@ bool get_is_category_and_children_removable(LLInventoryModel* model, const LLUUI { // Disable delete from COF folder; have users explicitly choose "detach/take off", // unless the item is not worn but in the COF (i.e. is bugged). - if (LLAppearanceMgr::instance().getIsProtectedCOFItem(item)) + if (item) { - if (get_is_item_worn(item)) + if (LLAppearanceMgr::instance().getIsProtectedCOFItem(item)) { - return false; + if (get_is_item_worn(item)) + { + return false; + } } - } - if (item && item->getIsLinkType()) - { - return true; - } - if (check_worn && get_is_item_worn(item)) - { - return false; + if (check_worn && !item->getIsLinkType() && get_is_item_worn(item)) + { + return false; + } } } -- cgit v1.2.3