diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-22 15:50:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-22 15:50:07 +0300 |
commit | e327c0f591dbc602376d85659e666cdbdd62b386 (patch) | |
tree | bc4eaff1285e584a28eacd20fcded92714df201e /src/gui | |
parent | a45e11159f7df1a80d75e2a6defb559ebc375e4b (diff) | |
download | manaplus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.gz manaplus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.bz2 manaplus-e327c0f591dbc602376d85659e666cdbdd62b386.tar.xz manaplus-e327c0f591dbc602376d85659e666cdbdd62b386.zip |
Fix crash if switch character with opened storage window.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 6 |
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: |