diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-12 17:51:23 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-12 17:51:23 +0000 |
commit | 21e86251c0e328a491ffe78d0f34c39646bbf447 (patch) | |
tree | 619a11af73b8bf6029e1a595e1c5e73a149a5454 /indra/newview | |
parent | 290a5846fc56046e7d8d65755250c49da25c9a46 (diff) |
CID-218
Checker: REVERSE_INULL
Function: LLAgentWearables::setWearableOutfit(const LLDynamicArray<LLPointer<LLInventoryItem>, (int)32> &, LLDynamicArray<LLWearable *, (int)32>&, int)
File: /indra/newview/llagentwearables.cpp
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagentwearables.cpp | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 5d6e88a833..def6e60abd 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -1606,33 +1606,31 @@ void LLAgentWearables::setWearableOutfit(const LLInventoryItem::item_array_t& it LLPointer<LLInventoryItem> new_item = items[i]; llassert(new_wearable); - if (!new_wearable) continue; - - const EWearableType type = new_wearable->getType(); - wearables_to_remove[type] = FALSE; - - // MULTI_WEARABLE: using 0th - LLWearable* old_wearable = getWearable(type, 0); - if (old_wearable) + if (new_wearable) { - const LLUUID& old_item_id = getWearableItemID(type, 0); - if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && - (old_item_id == new_item->getUUID())) - { - lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; - continue; - } + const EWearableType type = new_wearable->getType(); + wearables_to_remove[type] = FALSE; - // Assumes existing wearables are not dirty. - if (old_wearable->isDirty()) + // MULTI_WEARABLE: using 0th + LLWearable* old_wearable = getWearable(type, 0); + if (old_wearable) { - llassert(0); - continue; + const LLUUID& old_item_id = getWearableItemID(type, 0); + if ((old_wearable->getAssetID() == new_wearable->getAssetID()) && + (old_item_id == new_item->getUUID())) + { + lldebugs << "No change to wearable asset and item: " << LLWearableDictionary::getInstance()->getWearableEntry(type) << llendl; + continue; + } + + // Assumes existing wearables are not dirty. + if (old_wearable->isDirty()) + { + llassert(0); + continue; + } } - } - if (new_wearable) - { new_wearable->setItemID(new_item->getUUID()); setWearable(type,0,new_wearable); } |