summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp3
-rw-r--r--src/game.cpp1
-rw-r--r--src/gui/gui.cpp2
-rw-r--r--src/net/ea/inventoryhandler.cpp4
4 files changed, 8 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 8ab79ae25..939afef18 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -77,6 +77,7 @@
#include "gui/widgets/button.h"
#include "gui/widgets/desktop.h"
+#include "gui/widgets/windowcontainer.h"
#include "net/chathandler.h"
#include "net/download.h"
@@ -583,6 +584,8 @@ void Client::gameClear()
eventsManager.shutdown();
WindowManager::deleteWindows();
+ if (windowContainer)
+ windowContainer->slowLogic();
stopTimers();
diff --git a/src/game.cpp b/src/game.cpp
index e7ab0cb10..8495a39a0 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -101,6 +101,7 @@
#include "net/generalhandler.h"
#include "net/gamehandler.h"
+#include "net/inventoryhandler.h"
#include "net/packetcounters.h"
#include "net/serverfeatures.h"
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index b5b1ab414..39ab67be1 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -271,6 +271,8 @@ Gui::~Gui()
delete2(mSecureFont);
delete2(mInfoParticleFont);
delete2(mNpcFont);
+ if (windowContainer)
+ windowContainer->slowLogic();
delete getTop();
delete2(guiInput);
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index e9bc4e236..e540b9bef 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -322,9 +322,9 @@ void InventoryHandler::destroyStorage()
BLOCK_START("InventoryHandler::closeStorage")
if (storageWindow)
{
- storageWindow->unsetInventory();
+ InventoryWindow *const inv = storageWindow;
storageWindow->close();
- storageWindow = nullptr;
+ inv->unsetInventory();
}
BLOCK_END("InventoryHandler::closeStorage")
}