diff options
| author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-07-07 17:03:43 -0400 | 
|---|---|---|
| committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-07-07 17:03:43 -0400 | 
| commit | e50692ef4b8102291dbc668b4de64e8c511fcfab (patch) | |
| tree | a8928b084aaf69b30838dc543a8d842ac39a4d16 | |
| parent | aef4f6ccabe0b2f72296f1a4ae5634080396690a (diff) | |
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
| -rw-r--r-- | indra/newview/llappearancemgr.cpp | 10 | 
1 files 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;  		}  	}  }  | 
