]> git.0d.be Git - empathy.git/commitdiff
AccountChooser: don't return garbage from _set_account
authorWill Thompson <will.thompson@collabora.co.uk>
Fri, 9 Sep 2011 14:28:42 +0000 (15:28 +0100)
committerWill Thompson <will.thompson@collabora.co.uk>
Tue, 13 Sep 2011 13:17:57 +0000 (14:17 +0100)
Previously, the 'set' field of the stack-allocated 'data' structure was
not initialized. It's explicitly set to TRUE if the account is found,
but never otherwise set; so if the account is not found, this function
returned random garbage.

Reviewed-by: Xavier Claessens <xclaesse@gmail.com>
libempathy-gtk/empathy-account-chooser.c

index cb9028c310afa593687db63851a09a6c6444a1e7..c16f9c7e27d5216c76ad2f29b1cdd5b95bd24e9e 100644 (file)
@@ -428,6 +428,7 @@ empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
 
        data.chooser = chooser;
        data.account = account;
+       data.set = FALSE;
 
        gtk_tree_model_foreach (model,
                                (GtkTreeModelForeachFunc) account_chooser_set_account_foreach,