From 23e0b9550304fa4c8f412c09ce67d307d1878312 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 1 May 2015 00:32:10 +0300 Subject: Fix possible crash on exit with opened storage window. --- src/net/ea/inventoryhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net/ea') 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") } -- cgit v1.2.3-70-g09d2