diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 33e557cddd5ff3242bc4cb90a27eaba808ff07b9..8e6ac20eaab76f9167fefd5a459ec48ac7bbdace 100755
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3779,24 +3779,21 @@ void LLFolderBridge::modifyOutfit(BOOL append)
 
 	// checking amount of items to wear
 	U32 max_items = gSavedSettings.getU32("WearFolderLimit");
-	if (cat->getDescendentCount() > max_items)
-	{
-		LLInventoryModel::cat_array_t cats;
-		LLInventoryModel::item_array_t items;
-		LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
-		gInventory.collectDescendentsIf(cat->getUUID(),
-			cats,
-			items,
-			LLInventoryModel::EXCLUDE_TRASH,
-			not_worn);
-
-		if (items.size() > max_items)
-		{
-			LLSD args;
-			args["AMOUNT"] = llformat("%d", max_items);
-			LLNotificationsUtil::add("TooManyWearables", args);
-			return;
-		}
+	LLInventoryModel::cat_array_t cats;
+	LLInventoryModel::item_array_t items;
+	LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+	gInventory.collectDescendentsIf(cat->getUUID(),
+		cats,
+		items,
+		LLInventoryModel::EXCLUDE_TRASH,
+		not_worn);
+
+	if (items.size() > max_items)
+	{
+		LLSD args;
+		args["AMOUNT"] = llformat("%d", max_items);
+		LLNotificationsUtil::add("TooManyWearables", args);
+		return;
 	}
 
 	LLAppearanceMgr::instance().wearInventoryCategory( cat, FALSE, append );
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 575e5c5c52522443f2856ee1dd03aaaf0890fade..8561d265de246c3657e91614f84443fdcb8ff109 100755
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -2173,23 +2173,20 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
 	}
 
 	U32 max_items = gSavedSettings.getU32("WearFolderLimit");
-	if (category->getDescendentCount()>max_items)
-	{
-		LLInventoryModel::cat_array_t cats;
-		LLInventoryModel::item_array_t items;
-		LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
-		gInventory.collectDescendentsIf(category->getUUID(),
-			cats,
-			items,
-			LLInventoryModel::EXCLUDE_TRASH,
-			not_worn);
-		if (items.size() > max_items)
-		{
-			LLStringUtil::format_map_t args;
-			args["AMOUNT"] = llformat("%d", max_items);
-			mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args);
-			return ACCEPT_NO_CUSTOM;
-		}
+	LLInventoryModel::cat_array_t cats;
+	LLInventoryModel::item_array_t items;
+	LLFindWearablesEx not_worn(/*is_worn=*/ false, /*include_body_parts=*/ false);
+	gInventory.collectDescendentsIf(category->getUUID(),
+		cats,
+		items,
+		LLInventoryModel::EXCLUDE_TRASH,
+		not_worn);
+	if (items.size() > max_items)
+	{
+		LLStringUtil::format_map_t args;
+		args["AMOUNT"] = llformat("%d", max_items);
+		mCustomMsg = LLTrans::getString("TooltipTooManyWearables",args);
+		return ACCEPT_NO_CUSTOM;
 	}
 
 	if(mSource == SOURCE_AGENT)