From c0c3ee8c64675c106b1c92f973b7b9abb3eb1504 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 29 May 2026 00:44:00 +0900 Subject: [PATCH] fix: catch error if no GTK theme is available (headless installs) --- dzgui/views/base.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dzgui/views/base.py b/dzgui/views/base.py index e046b65..f9b7a00 100644 --- a/dzgui/views/base.py +++ b/dzgui/views/base.py @@ -323,8 +323,12 @@ class App(Gtk.Application): MainController = Controller() -theme = Gtk.IconTheme.get_default() -icons = theme.list_icons(None) -if STEAM_ICON not in icons: - logger.warn(strings.steam_icon_missing) - warnings.warn(strings.steam_icon_missing, stacklevel=2) +try: + theme = Gtk.IconTheme.get_default() + icons = theme.list_icons(None) + if STEAM_ICON not in icons: + logger.warn(strings.steam_icon_missing) + warnings.warn(strings.steam_icon_missing, stacklevel=2) +except Exception as e: + logger.warning(e) + warnings.warn(strings.gtk_theme_missing, stacklevel=2)