From e327c0f591dbc602376d85659e666cdbdd62b386 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 22 Mar 2015 15:50:07 +0300 Subject: Fix crash if switch character with opened storage window. --- src/gui/windows/inventorywindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 568da1cc1..a2c08f819 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -775,6 +775,12 @@ void InventoryWindow::setSplitAllowed(const bool allowed) void InventoryWindow::close() { + if (!mInventory) + { + Window::close(); + return; + } + switch (mInventory->getType()) { case InventoryType::INVENTORY: -- cgit v1.2.3-70-g09d2