From ce5128e4fb55c42bf6002855714225ed809dd4fb Mon Sep 17 00:00:00 2001 From: deepend Date: Wed, 25 Feb 2026 22:52:40 -0700 Subject: [PATCH] Added a theme_name null guard in the Adwaita/Yaru workaround condition inside create_input_style() so g_str_has_prefix() is only called when theme_name is non-null, while preserving existing behavior for non-null theme names. Left allocation/free flow unchanged; theme_name is still freed exactly once at the existing cleanup point after the reload block. --- src/fe-gtk/fe-gtk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index ee5285f8..465bcdf8 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -870,6 +870,7 @@ create_input_style (InputStyle *style) /* GTK3 equivalents for adwaita_workaround_rc/cursor_color_rc. */ if (adwaita_workaround_rc[0] != '\0' + && theme_name && (g_str_has_prefix (theme_name, "Adwaita") || g_str_has_prefix (theme_name, "Yaru"))) g_string_append (css, "background-image: none;");