accounts_dialog_button_create_clicked_cb: if, for some reason, mc_account_create...
authorGuillaume Desmottes <gdesmott@gnome.org>
Mon, 26 Jan 2009 10:42:28 +0000 (10:42 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 26 Jan 2009 10:42:28 +0000 (10:42 +0000)
From: Guillaume Desmottes <gdesmott@gnome.org>

svn path=/trunk/; revision=2256

src/empathy-accounts-dialog.c

index cc68c1bc349443401da88a495e0e908baddd5a12..892f242357c04fa2be02a808ae5936869e88b128 100644 (file)
@@ -823,6 +823,12 @@ accounts_dialog_button_create_clicked_cb (GtkWidget             *button,
 
        /* Create account */
        account = mc_account_create (profile);
+       if (account == NULL) {
+               /* We can't display an error to the user as MC doesn't give us
+                * any clue about the reason of the failure... */
+               return;
+       }
+
        /* To translator: %s is the protocol name */
        str = g_strdup_printf (_("New %s account"),
                               mc_profile_get_display_name (profile));