[epiphany] Ensure disconnecting callback from user style file monitor



commit 715ca7972b129868f7780bbc2986ba1b92b12e4d
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Thu May 7 22:16:51 2020 +0200

    Ensure disconnecting callback from  user style file monitor

 embed/ephy-embed-prefs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index 311802eb5..31b99c4d0 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -127,7 +127,11 @@ webkit_pref_callback_user_stylesheet (GSettings  *settings,
 
   value = g_settings_get_boolean (settings, key);
 
-  g_clear_object (&user_style_sheet_monitor);
+  if (user_style_sheet_monitor) {
+    g_signal_handlers_disconnect_by_func (user_style_sheet_monitor, user_style_sheet_file_changed, NULL);
+    g_clear_object (&user_style_sheet_monitor);
+  }
+
   g_clear_pointer (&style_sheet, webkit_user_style_sheet_unref);
 
   if (!value) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]