aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/cal-search-bar.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2003-04-05 03:21:50 +0800
committerJP Rosevear <jpr@src.gnome.org>2003-04-05 03:21:50 +0800
commit03c22238641a72e40cc853627ce9ad685b358373 (patch)
tree1b6a7f65e9ded7d0f646c41146fa4dbbb09dc058 /calendar/gui/cal-search-bar.c
parent7c9645a1763f4c545b4496df73fb5d8a6fc5c5e6 (diff)
downloadgsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.gz
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.zst
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.zip
guard against multiple destroy calls
2003-04-04 JP Rosevear <jpr@ximian.com> * gui/cal-search-bar.c (cal_search_bar_destroy): guard against multiple destroy calls svn path=/trunk/; revision=20672
Diffstat (limited to 'calendar/gui/cal-search-bar.c')
-rw-r--r--calendar/gui/cal-search-bar.c16
1 files changed, 9 insertions, 7 deletions
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);
}