Blob Blame Raw
From 0bc638d6fe732846dab03b52d11dc91163605a32 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@igalia.com>
Date: Wed, 3 Jul 2019 16:48:51 -0500
Subject: [PATCH] Fix crash in source_color_changed()

And opportunistically use g_signal_connect_object() when connecting to
the source object as well, because it's probably needed.

It looks like this is already fixed in a different way for master, so
this is only for gnome-3-32.

See !81 for details.
---
 src/gcal-source-dialog.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index b1aa1d99..0848e5cc 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -620,11 +620,11 @@ make_row_from_source (GcalSourceDialog *dialog,
   top_label = GTK_WIDGET (gtk_builder_get_object (builder, "title"));
   gtk_label_set_label (GTK_LABEL (top_label), e_source_get_display_name (source));
   g_object_bind_property (source, "display-name", top_label, "label", G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE);
-  g_signal_connect (source, "notify::display-name", G_CALLBACK (invalidate_calendar_listbox_sort),
-                    dialog->calendars_listbox);
+  g_signal_connect_object (source, "notify::display-name", G_CALLBACK (invalidate_calendar_listbox_sort),
+                           dialog->calendars_listbox, 0);
 
   extension = E_SOURCE_SELECTABLE (e_source_get_extension (source, E_SOURCE_EXTENSION_CALENDAR));
-  g_signal_connect (extension, "notify::color", G_CALLBACK (source_color_changed), icon);
+  g_signal_connect_object (extension, "notify::color", G_CALLBACK (source_color_changed), icon, 0);
 
   /* parent source name label */
   bottom_label = GTK_WIDGET (gtk_builder_get_object (builder, "subtitle"));
-- 
2.21.0