aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names-bonobo.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names-bonobo.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names-bonobo.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names-bonobo.c b/addressbook/gui/component/select-names/e-select-names-bonobo.c
index 3d17063622..bfe182b6f2 100644
--- a/addressbook/gui/component/select-names/e-select-names-bonobo.c
+++ b/addressbook/gui/component/select-names/e-select-names-bonobo.c
@@ -378,14 +378,20 @@ impl_dispose (GObject *object)
select_names = E_SELECT_NAMES_BONOBO (object);
priv = select_names->priv;
- if (priv->manager->names) {
- gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
- priv->manager->names = NULL;
- }
+ if (priv) {
+ if (priv->manager->names) {
+ gtk_widget_destroy (GTK_WIDGET (priv->manager->names));
+ priv->manager->names = NULL;
+ }
- g_object_unref (priv->manager);
+ g_object_unref (priv->manager);
+
+ g_free (priv);
+ select_names->priv = NULL;
+ }
- g_free (priv);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (object);
}