gnome-panel r10989 - trunk/applets/clock



Author: vuntz
Date: Mon Apr  7 13:59:27 2008
New Revision: 10989
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=10989&view=rev

Log:
2008-04-07  Vincent Untz  <vuntz gnome org>

	* calendar-sources.c: (calendar_sources_finalize_source_data):
	disconnect the backend_died signal handler to not have it left around
	with invalid user data when the CalendarSources object is finalized.
	Fix famous crash from bug #378854.


Modified:
   trunk/applets/clock/ChangeLog
   trunk/applets/clock/calendar-sources.c

Modified: trunk/applets/clock/calendar-sources.c
==============================================================================
--- trunk/applets/clock/calendar-sources.c	(original)
+++ trunk/applets/clock/calendar-sources.c	Mon Apr  7 13:59:27 2008
@@ -87,6 +87,8 @@
 static void calendar_sources_init       (CalendarSources      *sources);
 static void calendar_sources_finalize   (GObject             *object);
 
+static void backend_died_cb (ECal *client, CalendarSourceData *source_data);
+
 enum
 {
   APPOINTMENT_SOURCES_CHANGED,
@@ -206,7 +208,12 @@
 	}
 
       for (l = source_data->clients; l; l = l->next)
-	g_object_unref (l->data);
+        {
+          g_signal_handlers_disconnect_by_func (G_OBJECT (l->data),
+                                                G_CALLBACK (backend_died_cb),
+                                                source_data);
+          g_object_unref (l->data);
+        }
       source_data->clients = NULL;
 
       if (source_data->esource_list)



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