1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-20 08:53:52 +00:00

Use 'default icon' for items with no icon specified

This commit is contained in:
scrawl 2016-10-08 16:05:20 +02:00
parent 48f299532c
commit 3019d70986

View file

@ -79,7 +79,10 @@ namespace MWGui
void ItemWidget::setIcon(const MWWorld::Ptr &ptr) 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));
} }