From 30ff318dbb64f32d4038730013f4474a47db170c Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Thu, 4 Jan 2001 00:59:29 +0000 Subject: check capabilities is valid before doing a strstr. 2001-01-03 Michael Meeks * gui/widgets/e-addressbook-model.c (get_view): check capabilities is valid before doing a strstr. svn path=/trunk/; revision=7242 --- addressbook/gui/widgets/e-addressbook-model.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'addressbook/gui') 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; -- cgit