summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/inventorywindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index 712ba7981..d99717c9b 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -874,7 +874,10 @@ void InventoryWindow::widgetResized(const Event &event)
{
Window::widgetResized(event);
- if (!isMainInventory())
+ if (!mInventory)
+ return;
+ const InventoryType::Type type = mInventory->getType();
+ if (type != InventoryType::INVENTORY && type != InventoryType::CART)
return;
if (getWidth() < 600)