aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/cal-search-bar.c
diff options
context:
space:
mode:
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);
}