summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-11 14:21:59 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-11 14:21:59 +0000
commita1e2ce7fa29be3faca8e58d8df25ea05dcb8a4a5 (patch)
treef94f4a61d33826157ae508d1be20152d2d93bb45 /indra
parent03d7153e557cf0021cc44dde3310caca2df76b8f (diff)
CID-153
Checker: NULL_RETURNS Function: LLAgentWearables::makeNewOutfit(const std::basic_string<char, std::char_traits<char>, std::allocator<char>>&, const LLDynamicArray<int, (int)32> &, const LLDynamicArray<int, (int)32> &, int) File: /indra/newview/llagentwearables.cpp
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llagentwearables.cpp40
1 files changed, 22 insertions, 18 deletions
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 6620780b27..6078620e87 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1290,25 +1290,29 @@ void LLAgentWearables::makeNewOutfit(const std::string& new_folder_name,
j,
new_wearable,
todo);
- if (isWearableCopyable((EWearableType)type, j))
+ llassert(item);
+ if (item)
{
- copy_inventory_item(
- gAgent.getID(),
- item->getPermissions().getOwner(),
- item->getUUID(),
- folder_id,
- new_name,
- cb);
- }
- else
- {
- move_inventory_item(
- gAgent.getID(),
- gAgent.getSessionID(),
- item->getUUID(),
- folder_id,
- new_name,
- cb);
+ if (isWearableCopyable((EWearableType)type, j))
+ {
+ copy_inventory_item(
+ gAgent.getID(),
+ item->getPermissions().getOwner(),
+ item->getUUID(),
+ folder_id,
+ new_name,
+ cb);
+ }
+ else
+ {
+ move_inventory_item(
+ gAgent.getID(),
+ gAgent.getSessionID(),
+ item->getUUID(),
+ folder_id,
+ new_name,
+ cb);
+ }
}
}
}