aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-destination.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index 7ea2f5690f..7ddae75b48 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -1039,12 +1039,15 @@ static void
use_default_book_cb (EBook *book, gpointer closure)
{
EDestination *dest = E_DESTINATION (closure);
- if (dest->priv->cardify_book == NULL) {
+ if (book != NULL && dest->priv->cardify_book == NULL) {
dest->priv->cardify_book = book;
g_object_ref (book);
}
- launch_cardify_query (dest);
+ if (dest->priv->cardify_book)
+ launch_cardify_query (dest);
+ else
+ g_object_unref (dest);
}