From 3fbb69cbcb1e0020590d3f55d70ca371af4bca6d Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 29 Jun 2011 12:02:14 +0200 Subject: Bug #652627 - Invalid unref on a NULL pointer from query_cb --- addressbook/gui/merging/eab-contact-compare.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'addressbook') diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 1ba9b3811f..8295b77e7e 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -642,7 +642,8 @@ query_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) info->cb (info->contact, best_contact, best_match, info->closure); match_search_info_free (info); g_object_unref (book_client); - g_object_unref (best_contact); + if (best_contact) + g_object_unref (best_contact); } #define MAX_QUERY_PARTS 10 -- cgit