aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/select-names/e-select-names.c
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/component/select-names/e-select-names.c')
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index cb04e973a6..fe737bbce7 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -657,10 +657,15 @@ e_select_names_destroy (GtkObject *object)
{
ESelectNames *e_select_names = E_SELECT_NAMES(object);
- gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->local_listener), e_select_names);
- gtk_object_unref(GTK_OBJECT(e_select_names->local_listener));
- gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->other_contacts_listener), e_select_names);
- gtk_object_unref(GTK_OBJECT(e_select_names->other_contacts_listener));
+ if (e_select_names->local_listener) {
+ gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->local_listener), e_select_names);
+ gtk_object_unref(GTK_OBJECT(e_select_names->local_listener));
+ }
+
+ if (e_select_names->other_contacts_listener) {
+ gtk_signal_disconnect_by_data(GTK_OBJECT(e_select_names->other_contacts_listener), e_select_names);
+ gtk_object_unref(GTK_OBJECT(e_select_names->other_contacts_listener));
+ }
gtk_object_unref(GTK_OBJECT(e_select_names->gui));
g_hash_table_foreach(e_select_names->children, (GHFunc) e_select_names_child_free, e_select_names);