diff options
author | Oz Linden <oz@lindenlab.com> | 2010-12-04 09:14:58 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2010-12-04 09:14:58 -0500 |
commit | efa42a6aab6d3ada198072c0e2be2b7d9b4e1eb5 (patch) | |
tree | 39a949e1570c3524c8560522b693328fc7d9afbf /indra/newview/llwearabletype.cpp | |
parent | eed7b7201188e01a452c7f4c511c0cb157dc7a5f (diff) | |
parent | 7549df0eaf347e9f490f9cfaf4950dd623a08237 (diff) |
merge up to viewer-development
Diffstat (limited to 'indra/newview/llwearabletype.cpp')
-rw-r--r-- | indra/newview/llwearabletype.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llwearabletype.cpp b/indra/newview/llwearabletype.cpp index bb1ed61f40..f933be4d8f 100644 --- a/indra/newview/llwearabletype.cpp +++ b/indra/newview/llwearabletype.cpp @@ -99,6 +99,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; } @@ -107,6 +108,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; } @@ -115,6 +117,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; } @@ -123,6 +126,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; } @@ -131,8 +135,9 @@ 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; -} +} // static BOOL LLWearableType::getDisableCameraSwitch(LLWearableType::EType type) |