diff options
Diffstat (limited to 'src/gui/windows/inventorywindow.cpp')
-rw-r--r-- | src/gui/windows/inventorywindow.cpp | 6 |
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); |