aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-16 23:30:35 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-16 23:30:35 +0800
commita79ed9e3a32248ae0cc322073af1eb1c3d8ede93 (patch)
tree51b2b15d9190c55a46ad2e54c239e9c7cbe61c44 /mail/em-utils.c
parent94e43758de5e90ff3acf70654a53ddf787495f1b (diff)
downloadgsoc2013-evolution-a79ed9e3a32248ae0cc322073af1eb1c3d8ede93.tar.gz
gsoc2013-evolution-a79ed9e3a32248ae0cc322073af1eb1c3d8ede93.tar.zst
gsoc2013-evolution-a79ed9e3a32248ae0cc322073af1eb1c3d8ede93.zip
Bug #638391 - Always passing NULL to emu_addr_cancel_book()
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index cea8871887..2fdee28270 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1580,12 +1580,16 @@ emu_addr_setup (gpointer user_data)
static void
emu_addr_cancel_book (gpointer data)
{
- EBook *book = data;
+ EBook **pbook = data;
GError *err = NULL;
- /* we dunna care if this fails, its just the best we can try */
- e_book_cancel (book, &err);
- g_clear_error (&err);
+ g_return_if_fail (pbook != NULL);
+
+ if (*pbook) {
+ /* we dunna care if this fails, its just the best we can try */
+ e_book_cancel (*pbook, &err);
+ g_clear_error (&err);
+ }
}
static void
@@ -1750,7 +1754,7 @@ search_address_in_addressbooks (const gchar *address, gboolean local_only, gbool
d(printf(" checking '%s'\n", e_source_get_uri(source)));
- hook_book = mail_cancel_hook_add (emu_addr_cancel_book, book);
+ hook_book = mail_cancel_hook_add (emu_addr_cancel_book, &book);
hook_stop = mail_cancel_hook_add (emu_addr_cancel_stop, &stop);
book = g_hash_table_lookup (emu_books_hash, e_source_peek_uid (source));