diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-03-31 13:15:38 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-03-31 13:15:38 +0800 |
commit | 86c77578a13abb17b72f42495fe2d68b1f792318 (patch) | |
tree | 52b5eb54fd210b216f62b7b5dafd0d0fa3a2035f /widgets | |
parent | 006600fdf4add2090d166e90c0016b683c127ac9 (diff) | |
download | gsoc2013-evolution-86c77578a13abb17b72f42495fe2d68b1f792318.tar.gz gsoc2013-evolution-86c77578a13abb17b72f42495fe2d68b1f792318.tar.zst gsoc2013-evolution-86c77578a13abb17b72f42495fe2d68b1f792318.zip |
Handle multiple destroys.
2003-03-30 Hans Petter Jansson <hpj@ximian.com>
* e-calendar-item.c (e_calendar_item_destroy): Handle multiple
destroys.
svn path=/trunk/; revision=20588
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/misc/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/misc/e-calendar-item.c | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index ba73f83a99..b86d9c8943 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,8 @@ +2003-03-30 Hans Petter Jansson <hpj@ximian.com> + + * e-calendar-item.c (e_calendar_item_destroy): Handle multiple + destroys. + 2003-03-28 JP Rosevear <jpr@ximian.com> * e-search-bar.c (clear_search): set the sub item to the default diff --git a/widgets/misc/e-calendar-item.c b/widgets/misc/e-calendar-item.c index 3e781a9d3e..ee25c8f3bd 100644 --- a/widgets/misc/e-calendar-item.c +++ b/widgets/misc/e-calendar-item.c @@ -447,17 +447,24 @@ e_calendar_item_destroy (GtkObject *o) e_calendar_item_set_style_callback (calitem, NULL, NULL, NULL); e_calendar_item_set_get_time_callback (calitem, NULL, NULL, NULL); - g_free (calitem->styles); + if (calitem->styles) { + g_free (calitem->styles); + calitem->styles = NULL; + } if (calitem->signal_emission_idle_id != 0) { g_source_remove (calitem->signal_emission_idle_id); calitem->signal_emission_idle_id = 0; } - if (calitem->old_font) + if (calitem->old_font) { gdk_font_unref (calitem->old_font); - if (calitem->old_week_number_font) + calitem->old_font = NULL; + } + if (calitem->old_week_number_font) { gdk_font_unref (calitem->old_week_number_font); + calitem->old_week_number_font = NULL; + } if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (o); |