From de8c2b75aeaa2b97b1cfa4cc4998601e33ddcc4e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sun, 17 May 2020 11:51:48 +0200 Subject: [PATCH] fromTheme call should check first --- nw/gui/icons.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nw/gui/icons.py b/nw/gui/icons.py index db19e6ac..8457ea90 100644 --- a/nw/gui/icons.py +++ b/nw/gui/icons.py @@ -293,7 +293,8 @@ class GuiIcons: # If we're still here, try to set from system theme if self.ICON_MAP[iconKey][1] is not None: logger.verbose("Loading icon '%s' from system theme" % iconKey) - return QIcon().fromTheme(self.ICON_MAP[iconKey][1]) + if QIcon().hasThemeIcon(self.ICON_MAP[iconKey][1]): + return QIcon().fromTheme(self.ICON_MAP[iconKey][1]) # Finally. we check if we have a fallback icon if self.mainConf.guiDark: