summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-08-26 18:59:08 +0300
committerVadim Savchuk <vsavchuk@productengine.com>2010-08-26 18:59:08 +0300
commit75a66a146b8f4b3127eb86fec10c24cc45d3f6d7 (patch)
tree893a24c2f3b10f2da722158b4bad967c97613c13 /indra/newview/llappearancemgr.cpp
parent19fb0a16695b57e70dc371471d37c16929f1c424 (diff)
EXT-8727 FIXED Potential fix for a crash in LLAppearanceMgr::updateClothingOrderingInfo.
I couldn't reproduce the problem (it has happened for only two users, both running MacOSX), but from what I see in the logs, it might have been caused by (or related to) NULL COF items. I haven't found out how they appear nor what exactly causes the crash, but just for any case I added a check to make sure we don't try to update wearables ordering info for such items. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/876/ --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rw-r--r--indra/newview/llappearancemgr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 94286fd799..7159d89d21 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2307,12 +2307,17 @@ bool LLAppearanceMgr::updateBaseOutfit()
void LLAppearanceMgr::divvyWearablesByType(const LLInventoryModel::item_array_t& items, wearables_by_type_t& items_by_type)
{
- items_by_type.reserve(LLWearableType::WT_COUNT);
+ items_by_type.resize(LLWearableType::WT_COUNT);
if (items.empty()) return;
for (S32 i=0; i<items.count(); i++)
{
LLViewerInventoryItem *item = items.get(i);
+ if (!item)
+ {
+ LL_WARNS("Appearance") << "NULL item found" << llendl;
+ continue;
+ }
// Ignore non-wearables.
if (!item->isWearableType())
continue;
@@ -2335,6 +2340,7 @@ std::string build_order_string(LLWearableType::EType type, U32 i)
struct WearablesOrderComparator
{
+ LOG_CLASS(WearablesOrderComparator);
WearablesOrderComparator(const LLWearableType::EType type)
{
mControlSize = build_order_string(type, 0).size();