From d19d09875e8cf3d77bc464c07d2bb70354b9ae50 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Tue, 7 Jul 2009 14:01:31 +0100 Subject: can_add_contact_to_account: early return if connection is NULL (#587817) --- libempathy-gtk/empathy-contact-dialogs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c index c1cca3e2b..ef100a3b7 100644 --- a/libempathy-gtk/empathy-contact-dialogs.c +++ b/libempathy-gtk/empathy-contact-dialogs.c @@ -336,6 +336,8 @@ can_add_contact_to_account (EmpathyAccount *account, gboolean result; connection = empathy_account_get_connection (account); + if (connection == NULL) + return FALSE; contact_manager = empathy_contact_manager_dup_singleton (); result = empathy_contact_manager_can_add (contact_manager, connection); -- cgit v1.2.3