summaryrefslogtreecommitdiff
path: root/src/gui/windows/inventorywindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r--src/gui/windows/inventorywindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index c87fe3ebc..9a99937d5 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -148,8 +148,12 @@ InventoryWindow::InventoryWindow(Inventory *const inventory) :
mSortDropDown->setSelected(0);
}
- if (setupWindow && inventory->getType() != InventoryType::STORAGE)
+ if (setupWindow &&
+ inventory &&
+ inventory->getType() != InventoryType::STORAGE)
+ {
setupWindow->registerWindowForReset(this);
+ }
setResizable(true);
setCloseButton(true);