diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index e5e456acb8ab8da75a6c5ee356e61e437ca69a88..4834b31bc74e92c53798625366e5eb44be1172ac 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1182,7 +1182,7 @@ void LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name,
 					}
 
 					LLViewerInventoryItem* item = gInventory.getItem(getWearableItemID((EWearableType) type, j));
-					// BAP TODO
+					if (!item) continue;
 					LLPointer<LLInventoryCallback> cb = NULL;
 					link_inventory_item(gAgent.getID(),
 										item->getUUID(),
@@ -1214,7 +1214,6 @@ void LLAgentWearables::makeNewOutfitLinks(const std::string& new_folder_name,
 			LLInventoryItem* item = gInventory.getItem(item_id);
 			if (!item) continue;
 
-			// BAP link here
 			LLPointer<LLInventoryCallback> cb = NULL;
 			link_inventory_item(gAgent.getID(),
 								item->getUUID(),