From: Tomi Ollila Date: Tue, 7 Jan 2025 20:23:14 +0000 (+0200) Subject: theme: don't try to load "themerc"s if theme_name is NULL X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=577c24306fe630b8b4ec7b3cefed86511c550cdd;p=proto%2Flabwc.git theme: don't try to load "themerc"s if theme_name is NULL theme_name is NULL when ... is in rc.xml --- diff --git a/src/theme.c b/src/theme.c index e087b662..b0ebdf5f 100644 --- a/src/theme.c +++ b/src/theme.c @@ -1496,15 +1496,18 @@ theme_init(struct theme *theme, struct server *server, const char *theme_name) */ theme_builtin(theme, server); - /* - * Read - * - /share/themes/$theme_name/labwc/themerc - * - /share/themes/$theme_name/openbox-3/themerc - */ struct wl_list paths; - paths_theme_create(&paths, theme_name, "themerc"); - theme_read(theme, &paths); - paths_destroy(&paths); + + if (theme_name) { + /* + * Read + * - /share/themes/$theme_name/labwc/themerc + * - /share/themes/$theme_name/openbox-3/themerc + */ + paths_theme_create(&paths, theme_name, "themerc"); + theme_read(theme, &paths); + paths_destroy(&paths); + } /* Read /labwc/themerc-override */ paths_config_create(&paths, "themerc-override");