mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 13:19:40 +00:00
added an assert
This commit is contained in:
parent
f8c20ef77f
commit
c5d685c780
4 changed files with 8 additions and 3 deletions
|
@ -239,7 +239,9 @@ void ContainerBase::drawItems()
|
|||
for (std::vector<MWWorld::Ptr>::iterator it=unwantedItems.begin();
|
||||
it != unwantedItems.end(); ++it)
|
||||
{
|
||||
equippedItems.erase(std::find(unwantedItems.begin(), unwantedItems.end(), *it));
|
||||
std::vector<MWWorld::Ptr>::iterator found = std::find(unwantedItems.begin(), unwantedItems.end(), *it);
|
||||
assert(found != unwantedItems.end());
|
||||
equippedItems.erase(found);
|
||||
}
|
||||
// and add the items that are left (= have the correct category)
|
||||
for (std::vector<MWWorld::Ptr>::const_iterator it=equippedItems.begin();
|
||||
|
|
|
@ -209,6 +209,7 @@ namespace MWGui
|
|||
|
||||
if (invStore.getSlot(*slot) == invStore.end())
|
||||
{
|
||||
// slot is not occupied
|
||||
invStore.equip(*slot, it);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -151,6 +151,8 @@ WindowManager::~WindowManager()
|
|||
delete mToolTips;
|
||||
delete mCharGen;
|
||||
delete mDragAndDrop;
|
||||
delete mBookWindow;
|
||||
delete mScrollWindow;
|
||||
|
||||
cleanupGarbage();
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace GUI
|
|||
|
||||
void shutdown()
|
||||
{
|
||||
MyGUI::LayoutManager::getInstance().unloadLayout(mListWindowRoot);
|
||||
MyGUI::Gui::getInstance().destroyWidget(mMainWidget);
|
||||
mListWindowRoot.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue