From 3da4948c0fc1f2c21b163f0ec456b2d99c881258 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 Sep 2013 12:31:19 -0400 Subject: Miscellaneous cleanups. --- addressbook/gui/widgets/e-addressbook-model.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'addressbook/gui/widgets/e-addressbook-model.c') diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index 683eed3499..1cd13294a0 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -360,11 +360,17 @@ client_view_ready_cb (GObject *source_object, EAddressbookModel *model = user_data; GError *error = NULL; - if (!e_book_client_get_view_finish (book_client, result, &client_view, &error)) - client_view = NULL; + e_book_client_get_view_finish ( + book_client, result, &client_view, &error); - if (error) { - eab_error_dialog (NULL, NULL, _("Error getting book view"), error); + /* Sanity check. */ + g_return_if_fail ( + ((client_view != NULL) && (error == NULL)) || + ((client_view == NULL) && (error != NULL))); + + if (error != NULL) { + eab_error_dialog ( + NULL, NULL, _("Error getting book view"), error); g_error_free (error); return; } -- cgit v1.2.3