diff options
-rw-r--r-- | calendar/ChangeLog | 5 | ||||
-rw-r--r-- | calendar/gui/cal-search-bar.c | 16 |
2 files changed, 14 insertions, 7 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 753f1bc4d2..b34195f652 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -4,6 +4,11 @@ 2003-04-04 JP Rosevear <jpr@ximian.com> + * gui/cal-search-bar.c (cal_search_bar_destroy): guard against + multiple destroy calls + +2003-04-04 JP Rosevear <jpr@ximian.com> + * cal-client/cal-client.c (get_default_uri): guard against empty uri as well diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index e5c64aaa72..d04cbcb492 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -167,14 +167,16 @@ cal_search_bar_destroy (GtkObject *object) cal_search = CAL_SEARCH_BAR (object); priv = cal_search->priv; - if (priv->categories) { - free_categories (priv->categories); - priv->categories = NULL; + if (priv) { + if (priv->categories) { + free_categories (priv->categories); + priv->categories = NULL; + } + + g_free (priv); + cal_search->priv = NULL; } - - g_free (priv); - cal_search->priv = NULL; - + if (GTK_OBJECT_CLASS (parent_class)->destroy) (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } |