summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
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 /src/gui/windows/inventorywindow.cpp
parenta45e11159f7df1a80d75e2a6defb559ebc375e4b (diff)
downloadplus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.gz
plus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.bz2
plus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.xz
plus-e327c0f591dbc602376d85659e666cdbdd62b386.zip
Fix crash if switch character with opened storage window.
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-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: