aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
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
parent7c9645a1763f4c545b4496df73fb5d8a6fc5c5e6 (diff)
downloadgsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.gz
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.bz2
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.lz
gsoc2013-evolution-03c22238641a72e40cc853627ce9ad685b358373.tar.xz
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')
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/cal-search-bar.c16
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);
}