diff options
-rw-r--r-- | addressbook/ChangeLog | 5 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 14cf35db26..6f96dbba45 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,10 @@ 2001-01-03 Michael Meeks <michael@helixcode.com> + * gui/widgets/e-addressbook-model.c (get_view): check + capabilities is valid before doing a strstr. + +2001-01-03 Michael Meeks <michael@helixcode.com> + * backend/pas/pas-backend-file.c (pas_backend_file_search): g_strdup things we g_free. diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 830b70879c..35c8dda745 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -317,19 +317,19 @@ book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointe } static gboolean -get_view(EAddressbookModel *model) +get_view (EAddressbookModel *model) { if (model->book && model->query) { if (model->first_get_view) { char *capabilities; - capabilities = e_book_get_static_capabilities(model->book); - if (strstr(capabilities, "local")) { - e_book_get_book_view(model->book, model->query, book_view_loaded, model); + capabilities = e_book_get_static_capabilities (model->book); + if (capabilities && strstr (capabilities, "local")) { + e_book_get_book_view (model->book, model->query, book_view_loaded, model); } model->first_get_view = FALSE; } else - e_book_get_book_view(model->book, model->query, book_view_loaded, model); + e_book_get_book_view (model->book, model->query, book_view_loaded, model); } model->get_view_idle = 0; |