summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-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: