aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-calendar-item.c13
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);