From 53cc3c86f2b5040cec577145feff9db2c93bd268 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 May 2015 02:48:54 +0300 Subject: Fix some issues after automatic checks. --- src/gui/windows/inventorywindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/gui/windows/inventorywindow.cpp') 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); -- cgit v1.2.3-70-g09d2