summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/ea/inventoryhandler.cpp')
-rw-r--r--src/net/ea/inventoryhandler.cpp4
1 files changed, 2 insertions, 2 deletions
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")
}