summaryrefslogtreecommitdiff
path: root/src/net/ea/inventoryhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-01 00:32:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-01 00:32:10 +0300
commit23e0b9550304fa4c8f412c09ce67d307d1878312 (patch)
tree67221624f8bba25ff0847c450a0faf529723db57 /src/net/ea/inventoryhandler.cpp
parent3d9372a2b17f50cfe2fca55dc59ad2db66df2e97 (diff)
downloadmanaplus-23e0b9550304fa4c8f412c09ce67d307d1878312.tar.gz
manaplus-23e0b9550304fa4c8f412c09ce67d307d1878312.tar.bz2
manaplus-23e0b9550304fa4c8f412c09ce67d307d1878312.tar.xz
manaplus-23e0b9550304fa4c8f412c09ce67d307d1878312.zip
Fix possible crash on exit with opened storage window.
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")
}