From 4fabc3b420d3123921e5522ce753d56b7fc0ad58 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sat, 4 Aug 2001 02:54:28 +0000 Subject: Check for storage != NULL here. This shouldn't come up unless addressbook 2001-08-03 Christopher James Lahey * gui/component/select-names/e-select-names.c (e_select_names_hookup_shell_listener): Check for storage != NULL here. This shouldn't come up unless addressbook has crashed previously within this session of evolution, but this is just a bit of insurance. svn path=/trunk/; revision=11644 --- .../gui/component/select-names/e-select-names.c | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'addressbook/gui') 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); -- cgit