EXT-4387 - Possible fix. No repro, but added an extra safety check and warning the only place in the function that it appears that something could go wrong

if we have inventory corruption and InventoryType is wearable but the wearable type bitfield is in a broken state.
-Reviewed by vir.
meow-7.2.2
Eric M. Tulla (BigPapi) 2010-02-11 11:06:42 -05:00
parent 543a75919a
commit 71ae50c56b
1 changed files with 5 additions and 0 deletions

View File

@ -666,6 +666,11 @@ void LLAppearanceManager::filterWearableItems(
if (!item->isWearableType())
continue;
EWearableType type = item->getWearableType();
if(type < 0 || type >= WT_COUNT)
{
LL_WARNS("Appearance") << "Invalid wearable type. Type does not match wearable flag bitfield." << LL_ENDL;
continue;
}
items_by_type[type].push_back(item);
}