Use 'default icon' for items with no icon specified

pull/75/head
scrawl 8 years ago
parent 48f299532c
commit 3019d70986

@ -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));
}

Loading…
Cancel
Save