1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +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(),