G_BEGIN_DECLS
GtkWidget * empathy_profile_chooser_new (void);
-McProfile * empathy_profile_chooser_get_selected (GtkWidget *widget);
+McProfile * empathy_profile_chooser_dup_selected (GtkWidget *widget);
gint empathy_profile_chooser_n_profiles (GtkWidget *widget);
G_END_DECLS
gchar *str;
McProfileCapabilityFlags cap;
- profile = empathy_profile_chooser_get_selected (dialog->combobox_profile);
+ profile = empathy_profile_chooser_dup_selected (dialog->combobox_profile);
/* 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... */
+ g_object_unref (profile);
return;
}
McProfile *profile;
McProfileCapabilityFlags cap;
- profile = empathy_profile_chooser_get_selected (dialog->combobox_profile);
+ profile = empathy_profile_chooser_dup_selected (dialog->combobox_profile);
cap = mc_profile_get_capabilities (profile);
if (cap & MC_PROFILE_CAPABILITY_REGISTRATION_UI) {