summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-22 15:50:07 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-22 15:50:07 +0300
commite327c0f591dbc602376d85659e666cdbdd62b386 (patch)
treebc4eaff1285e584a28eacd20fcded92714df201e
parenta45e11159f7df1a80d75e2a6defb559ebc375e4b (diff)
downloadmanaverse-e327c0f591dbc602376d85659e666cdbdd62b386.tar.gz
manaverse-e327c0f591dbc602376d85659e666cdbdd62b386.tar.bz2
manaverse-e327c0f591dbc602376d85659e666cdbdd62b386.tar.xz
manaverse-e327c0f591dbc602376d85659e666cdbdd62b386.zip
Fix crash if switch character with opened storage window.
-rw-r--r--src/gui/windows/inventorywindow.cpp6
1 files changed, 6 insertions, 0 deletions
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: