From 3019d70986256fce9ff29e75ca152b572922124f Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 8 Oct 2016 16:05:20 +0200 Subject: [PATCH] Use 'default icon' for items with no icon specified --- apps/openmw/mwgui/itemwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index 75436e797..fa8383ace 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -79,7 +79,10 @@ namespace MWGui void ItemWidget::setIcon(const MWWorld::Ptr &ptr) { - setIcon(MWBase::Environment::get().getWindowManager()->correctIconPath(ptr.getClass().getInventoryIcon(ptr))); + std::string invIcon = ptr.getClass().getInventoryIcon(ptr); + if (invIcon.empty()) + invIcon = "default icon.tga"; + setIcon(MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon)); }