aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 5b11ddc2e..4252ae019 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -335,6 +335,10 @@ can_add_contact_to_account (EmpathyAccount *account,
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);
g_object_unref (contact_manager);