From 18b0c8df946cd8dd936c5a81bb2f143371d28060 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 7 Apr 2003 20:02:52 +0000 Subject: Fixes #40876 2003-04-07 JP Rosevear Fixes #40876 * gui/e-meeting-time-sel.c (e_meeting_time_selector_refresh_free_busy): guard against callbacks after destruction (e_meeting_time_selector_refresh_cb): ditto svn path=/trunk/; revision=20727 --- calendar/gui/e-meeting-time-sel.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-meeting-time-sel.c') diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 7e21598115..b857814125 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -1223,8 +1223,11 @@ static void e_meeting_time_selector_refresh_cb (gpointer data) { EMeetingTimeSelector *mts = data; - gtk_widget_queue_draw (mts->display_top); - gtk_widget_queue_draw (mts->display_main); + + if (mts->display_top != NULL) + gtk_widget_queue_draw (mts->display_top); + if (mts->display_main != NULL) + gtk_widget_queue_draw (mts->display_main); } static void @@ -1241,12 +1244,17 @@ e_meeting_time_selector_refresh_free_busy (EMeetingTimeSelector *mts, int row, g end.hour = 0; end.minute = 0; + /* Ref ourselves in case we are called back after destruction */ + gtk_object_ref (GTK_OBJECT (mts)); + if (all) e_meeting_model_refresh_all_busy_periods (mts->model, &start, &end, e_meeting_time_selector_refresh_cb, mts); else e_meeting_model_refresh_busy_periods (mts->model, row, &start, &end, e_meeting_time_selector_refresh_cb, mts); + + gtk_object_unref (GTK_OBJECT (mts)); } EMeetingTimeSelectorAutopickOption -- cgit v1.2.3