1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

crash fix (hopefully)

This commit is contained in:
scrawl 2012-05-16 14:32:48 +02:00
parent 6a0cb32b7e
commit 398a7dc65c

View File

@ -239,8 +239,8 @@ void ContainerBase::drawItems()
for (std::vector<MWWorld::Ptr>::iterator it=unwantedItems.begin();
it != unwantedItems.end(); ++it)
{
std::vector<MWWorld::Ptr>::iterator found = std::find(unwantedItems.begin(), unwantedItems.end(), *it);
assert(found != unwantedItems.end());
std::vector<MWWorld::Ptr>::iterator found = std::find(equippedItems.begin(), equippedItems.end(), *it);
assert(found != equippedItems.end());
equippedItems.erase(found);
}
// and add the items that are left (= have the correct category)