summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-11-15 21:01:05 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-11-15 21:01:05 +0200
commit7ff358efc46a07c1ed3bc845c693d67c5eb95b69 (patch)
treeb9cf10714c88665d3b35821b04d588f9fe15ea73
parentbacdab30064157c305d45841964ab491906256d0 (diff)
SL-20575 Fixed premature exit
-rw-r--r--indra/newview/llinventoryfunctions.cpp21
1 files changed, 10 insertions, 11 deletions
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;
+ }
}
}