diff options
-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: |