diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c index 9340bbce48..f1463f0020 100644 --- a/addressbook/gui/component/select-names/e-select-names.c +++ b/addressbook/gui/component/select-names/e-select-names.c @@ -412,20 +412,23 @@ e_select_names_hookup_shell_listener (ESelectNames *e_select_names) gtk_signal_connect(GTK_OBJECT(e_select_names->listener), "removed_folder", GTK_SIGNAL_FUNC(removed_folder), e_select_names); - GNOME_Evolution_Storage_addListener(storage, listener, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_select_names_init: Exception adding listener to " - "remote GNOME_Evolution_Storage interface.\n"); - CORBA_exception_free (&ev); - return; - } + if (storage != NULL) { + GNOME_Evolution_Storage_addListener(storage, listener, &ev); + + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("e_select_names_init: Exception adding listener to " + "remote GNOME_Evolution_Storage interface.\n"); + CORBA_exception_free (&ev); + return; + } - bonobo_object_release_unref(storage, &ev); - if (ev._major != CORBA_NO_EXCEPTION) { - g_warning ("e_select_names_init: Exception unref'ing " - "remote GNOME_Evolution_Storage interface.\n"); - CORBA_exception_free (&ev); - return; + bonobo_object_release_unref(storage, &ev); + if (ev._major != CORBA_NO_EXCEPTION) { + g_warning ("e_select_names_init: Exception unref'ing " + "remote GNOME_Evolution_Storage interface.\n"); + CORBA_exception_free (&ev); + return; + } } CORBA_exception_free(&ev); |