From e50692ef4b8102291dbc668b4de64e8c511fcfab Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 7 Jul 2010 17:03:43 -0400 Subject: SNOW-704 EXT-8267 FIX Crash on login for invalid inventory wearable type data Used to assert that the inventory's stored wearable type data matched the asset's stored wearable type, leading to a crash when these did not line up. Converted the assert to a check with llwarns for when this happens. code reviewed by vir --- indra/newview/llappearancemgr.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index f8cff42412..d8403d54f2 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -830,10 +830,14 @@ void LLWearableHoldingPattern::onWearableAssetFetch(LLWearable *wearable) LLFoundData& data = *iter; if(wearable->getAssetID() == data.mAssetID) { - data.mWearable = wearable; // Failing this means inventory or asset server are corrupted in a way we don't handle. - llassert((data.mWearableType < LLWearableType::WT_COUNT) && (wearable->getType() == data.mWearableType)); - break; + if ((data.mWearableType >= LLWearableType::WT_COUNT) || (wearable->getType() != data.mWearableType)) + { + llwarns << "recovered wearable but type invalid. inventory wearable type: " << data.mWearableType << " asset wearable type: " << wearable->getType() << llendl; + break; + } + + data.mWearable = wearable; } } } -- cgit v1.2.3