From 352d3c7d3b080850f4fc81b502a0f0b0d3c2369d Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 14 May 2003 18:45:55 +0000 Subject: guard against multiple destroys 2003-05-14 JP Rosevear * gui/e-tasks.c (e_tasks_destroy): guard against multiple destroys * cal-client/cal-client.c (cal_client_finalize): unref the bonobo listener * gui/gnome-cal.c (gnome_calendar_destroy): guard against multiple destroy calls * gui/e-week-view.c (e_week_view_init): connect after destroy (invisible_destroyed): don't unref, its already destroyed * gui/e-day-view.c (e_day_view_init): connect after destroy (invisible_destroyed): don't unref, its already destroyed * gui/e-calendar-table.c (e_calendar_table_class_init): make sure we set the parent class (e_calendar_table_init): connect after the destroy handler runs (e_calendar_table_destroy): guard against multiple destroys (invisible_destroyed): don't unref the invisible, its already being destroyed * gui/calendar-offline-handler.c (backend_cal_set_mode): unref the client, we are done with it now (backend_cal_opened_online): ditto (impl_dispose): unref our main client * gui/calendar-commands.c (control_util_set_folder_bar_label): release/unref the shell view once we are done with it (control_util_show_settings): ditto svn path=/trunk/; revision=21180 --- calendar/gui/calendar-offline-handler.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar-offline-handler.c') diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c index c5b742d614..894f3cf560 100644 --- a/calendar/gui/calendar-offline-handler.c +++ b/calendar/gui/calendar-offline-handler.c @@ -39,7 +39,7 @@ static BonoboObjectClass *parent_class = NULL; struct _CalendarOfflineHandlerPrivate { CalClient *client; - + GNOME_Evolution_OfflineProgressListener listener_interface; gboolean is_offline; @@ -143,6 +143,7 @@ backend_cal_set_mode (CalClient *client, CalClientSetModeStatus status, CalMode CalendarOfflineHandler *offline_handler = data; update_offline (offline_handler); + g_object_unref (client); } static void @@ -171,6 +172,7 @@ backend_cal_opened_online (CalClient *client, CalClientOpenStatus status, gpoint } cal_client_set_mode (client, CAL_MODE_REMOTE); + g_object_unref (client); } static void @@ -188,7 +190,7 @@ backend_go_offline (gpointer data, gpointer user_data) update_offline (offline_handler); g_object_unref (client); return; - } + } } static void @@ -256,6 +258,8 @@ impl_dispose (GObject *object) offline_handler = CALENDAR_OFFLINE_HANDLER (object); priv = offline_handler->priv; + g_object_unref (priv->client); + if (priv->listener_interface != CORBA_OBJECT_NIL) { CORBA_Environment ev; -- cgit v1.2.3