summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2010-06-04 17:34:46 -0400
committerNyx (Neal Orman) <nyx@lindenlab.com>2010-06-04 17:34:46 -0400
commit244321e70cf341ca0542a9963d9e1e68cafca8d5 (patch)
treeb629679a1e0e76a17203b6b077f6e13295ca3b28 /indra/newview/llviewermenu.cpp
parentc26eeb6f7a51759bc4597ab7ae6efc80ee50b1c3 (diff)
AVP-44 VWR-19699 FIX Multi-wearables and wearable replacement logic
Cleaned up a few things upon code review. Code reviewed by vir for this checkin as well as following previous commits: a801af3728ee af42810b946c
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 23fb97a358..2c7ae539ce 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -7495,7 +7495,9 @@ class LLEditTakeOff : public view_listener_t
else
{
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
- if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
+ if (type >= LLWearableType::WT_SHAPE
+ && type < LLWearableType::WT_COUNT
+ && (gAgentWearables.getWearableCount(type) > 0))
{
// MULTI-WEARABLES: assuming user wanted to remove top shirt.
U32 wearable_index = gAgentWearables.getWearableCount(type) - 1;