diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2023-03-20 21:23:36 +0100 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2023-03-21 12:17:24 +0000 |
commit | 69e7b8e79ad71094283fb41ad018f6a8c43ade65 (patch) | |
tree | 609270e689f1d31b97bda45581a5b5e7ad59a6bb | |
parent | 95386a14235155e4390253c77ede8877b525b9e3 (diff) | |
download | gnome-shell-69e7b8e79ad71094283fb41ad018f6a8c43ade65.tar.gz |
st/icon-theme: Disconnect from settings signals on disposal
Icon themes can be created by extensions and thus are likely destroyed on
extension unload, so we must disconnect from StSettings signals to avoid
accessing to invalid memory.
See: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2012021
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2711>
-rw-r--r-- | src/st/st-icon-theme.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/st/st-icon-theme.c b/src/st/st-icon-theme.c index dc3f8cedc..d6f68afbb 100644 --- a/src/st/st-icon-theme.c +++ b/src/st/st-icon-theme.c @@ -478,8 +478,8 @@ st_icon_theme_init (StIconTheme *icon_theme) icon_theme->pixbuf_supports_svg = pixbuf_supports_svg (); settings = st_settings_get (); - g_signal_connect (settings, "notify::gtk-icon-theme", - G_CALLBACK (theme_changed), icon_theme); + g_signal_connect_object (settings, "notify::gtk-icon-theme", + G_CALLBACK (theme_changed), icon_theme, 0); update_current_theme (icon_theme); } |