From 6291b9304b98945b571cd9dcf87f129921df8648 Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sun, 14 Feb 2021 16:56:21 +0000 Subject: [PATCH] Log when icon is missing and fallback is used --- apps/openmw/mwgui/itemwidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/openmw/mwgui/itemwidget.cpp b/apps/openmw/mwgui/itemwidget.cpp index 7c7fa8828..d2dfa827b 100644 --- a/apps/openmw/mwgui/itemwidget.cpp +++ b/apps/openmw/mwgui/itemwidget.cpp @@ -5,6 +5,7 @@ #include #include +#include // correctIconPath #include #include @@ -111,7 +112,10 @@ namespace MWGui invIcon = "default icon.tga"; invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath(invIcon); if (!MWBase::Environment::get().getResourceSystem()->getVFS()->exists(invIcon)) + { + Log(Debug::Error) << "Failed to open image: '" << invIcon << "' not found, falling back to 'default-icon.tga'"; invIcon = MWBase::Environment::get().getWindowManager()->correctIconPath("default icon.tga"); + } setIcon(invIcon); }