summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/inventorywindow.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/inventorywindow.cpp b/src/gui/inventorywindow.cpp
index bb6f021e..f214fde5 100644
--- a/src/gui/inventorywindow.cpp
+++ b/src/gui/inventorywindow.cpp
@@ -331,11 +331,14 @@ void InventoryWindow::setSplitAllowed(bool allowed)
void InventoryWindow::close()
{
if (this == inventoryWindow)
- return;
-
- Net::getInventoryHandler()->closeStorage(Inventory::STORAGE);
-
- scheduleDelete();
+ {
+ setVisible(false);
+ }
+ else
+ {
+ Net::getInventoryHandler()->closeStorage(Inventory::STORAGE);
+ scheduleDelete();
+ }
}
void InventoryWindow::updateWeight()