summaryrefslogtreecommitdiff
path: root/indra/newview/llwearabletype.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
committerLeyla Farazha <leyla@lindenlab.com>2010-09-16 12:02:24 -0700
commit60db8577a90be3ea3d4a06ab06232802be953286 (patch)
tree0fcedbdf478b3f518a0d5dc69b7d234406355d75 /indra/newview/llwearabletype.cpp
parentae623c8068145f968f09ccf9bbdd90e993ca4283 (diff)
parent1dbcc3fff79b55038178e493df0cc0c3a4d66221 (diff)
Merge
Diffstat (limited to 'indra/newview/llwearabletype.cpp')
-rw-r--r--indra/newview/llwearabletype.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp
index d2e62c86ab..0d707d65bf 100644
--- a/indra/newview/llwearabletype.cpp
+++ b/indra/newview/llwearabletype.cpp
@@ -77,8 +77,8 @@ LLWearableDictionary::LLWearableDictionary()
addEntry(LLWearableType::WT_SKIRT, new WearableEntry("skirt", "New Skirt", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_SKIRT));
addEntry(LLWearableType::WT_ALPHA, new WearableEntry("alpha", "New Alpha", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_ALPHA));
addEntry(LLWearableType::WT_TATTOO, new WearableEntry("tattoo", "New Tattoo", LLAssetType::AT_CLOTHING, LLInventoryIcon::ICONNAME_CLOTHING_TATTOO));
- addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE));
- addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_NONE));
+ addEntry(LLWearableType::WT_INVALID, new WearableEntry("invalid", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_INVALID));
+ addEntry(LLWearableType::WT_NONE, new WearableEntry("none", "Invalid Wearable", LLAssetType::AT_NONE, LLInventoryIcon::ICONNAME_INVALID));
}
// static
@@ -94,6 +94,7 @@ const std::string& LLWearableType::getTypeName(LLWearableType::EType type)
{
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
const WearableEntry *entry = dict->lookup(type);
+ if (!entry) return getTypeName(WT_INVALID);
return entry->mName;
}
@@ -102,6 +103,7 @@ const std::string& LLWearableType::getTypeDefaultNewName(LLWearableType::EType t
{
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
const WearableEntry *entry = dict->lookup(type);
+ if (!entry) return getTypeDefaultNewName(WT_INVALID);
return entry->mDefaultNewName;
}
@@ -110,6 +112,7 @@ const std::string& LLWearableType::getTypeLabel(LLWearableType::EType type)
{
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
const WearableEntry *entry = dict->lookup(type);
+ if (!entry) return getTypeLabel(WT_INVALID);
return entry->mLabel;
}
@@ -118,6 +121,7 @@ LLAssetType::EType LLWearableType::getAssetType(LLWearableType::EType type)
{
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
const WearableEntry *entry = dict->lookup(type);
+ if (!entry) return getAssetType(WT_INVALID);
return entry->mAssetType;
}
@@ -126,6 +130,7 @@ LLInventoryIcon::EIconName LLWearableType::getIconName(LLWearableType::EType typ
{
const LLWearableDictionary *dict = LLWearableDictionary::getInstance();
const WearableEntry *entry = dict->lookup(type);
+ if (!entry) return getIconName(WT_INVALID);
return entry->mIconName;
-}
+}