From 4099872e4054e2a88b251800b5a93364e090263e Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 21 May 2002 18:37:21 +0000 Subject: Don't try to invoke e_book_get_uri() on NULL. Fixes #20069. * gui/component/addressbook.c (load_uri_cb): Don't try to invoke e_book_get_uri() on NULL. Fixes #20069. svn path=/trunk/; revision=16968 --- addressbook/gui/component/addressbook.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 332ddf3b56..b74b946098 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -620,14 +620,14 @@ load_uri_auth_cb (EBook *book, EBookStatus status, gpointer closure) static void load_uri_cb (EBook *book, EBookStatus status, gpointer closure) { - AddressbookSource *source; LoadUriData *load_uri_data = closure; - source = addressbook_storage_get_source_by_uri (e_book_get_uri (book)); + if (status == E_BOOK_STATUS_SUCCESS && book != NULL) { + AddressbookSource *source; - if (status == E_BOOK_STATUS_SUCCESS) { /* check if the addressbook needs authentication */ + source = addressbook_storage_get_source_by_uri (e_book_get_uri (book)); if (source && source->auth != ADDRESSBOOK_LDAP_AUTH_NONE) { const char *password; -- cgit