aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-model.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-09-08 00:31:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-09-08 07:08:54 +0800
commit3da4948c0fc1f2c21b163f0ec456b2d99c881258 (patch)
tree479d6153d31e03cb7a65990683b5271402e5ec29 /addressbook/gui/widgets/e-addressbook-model.c
parent2e5031cb4538b4819e5fce5d717668c3445df80a (diff)
downloadgsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.gz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.bz2
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.lz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.xz
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.tar.zst
gsoc2013-evolution-3da4948c0fc1f2c21b163f0ec456b2d99c881258.zip
Miscellaneous cleanups.
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c14
1 files changed, 10 insertions, 4 deletions
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;
}