From 27737d4258d81cb800ce0514fc7514d6e73abd2d Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 13 May 2019 17:59:32 +0400 Subject: [PATCH] Fix an exception during reload when container windows is active. It is a regression in the animated containers feature. --- apps/openmw/mwgui/container.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index f89cd4ff3..bfe93f6ed 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -161,7 +161,8 @@ namespace MWGui if (mModel) mModel->onClose(); - MWBase::Environment::get().getMechanicsManager()->onClose(mPtr); + if (!mPtr.isEmpty()) + MWBase::Environment::get().getMechanicsManager()->onClose(mPtr); } void ContainerWindow::onCloseButtonClicked(MyGUI::Widget* _sender)