1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 21:45:33 +00:00

Fix exception closing container window

This commit is contained in:
scrawl 2014-01-07 18:11:19 +01:00
parent d97615d5d8
commit c4ab2f417a

View file

@ -242,9 +242,11 @@ namespace MWGui
{
WindowBase::close();
// Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
if (!MWBase::Environment::get().getWindowManager()->containsMode(GM_Container)
&& !mPickpocketDetected // If it was already detected while taking an item, no need to check now
if (dynamic_cast<PickpocketItemModel*>(mModel)
// Make sure we were actually closed, rather than just temporarily hidden (e.g. console or main menu opened)
&& !MWBase::Environment::get().getWindowManager()->containsMode(GM_Container)
// If it was already detected while taking an item, no need to check now
&& !mPickpocketDetected
)
{
MWMechanics::Pickpocket pickpocket(MWBase::Environment::get().getWorld()->getPlayer().getPlayer(),