]> git.0d.be Git - empathy.git/commitdiff
can_add_contact_to_account: early return if connection is NULL (#587817)
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 7 Jul 2009 13:01:31 +0000 (14:01 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 7 Jul 2009 15:15:23 +0000 (16:15 +0100)
libempathy-gtk/empathy-contact-dialogs.c

index c1cca3e2bf84233c5d1cd8009d394098f497446b..ef100a3b7afce808fa3860306efa2b632a90eeb5 100644 (file)
@@ -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);