From 0a3f996d2ec2eed860edda7c36a9b6bdbd9d2722 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 9 Sep 2011 15:28:42 +0100 Subject: AccountChooser: don't return garbage from _set_account 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 --- libempathy-gtk/empathy-account-chooser.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c index cb9028c31..c16f9c7e2 100644 --- a/libempathy-gtk/empathy-account-chooser.c +++ b/libempathy-gtk/empathy-account-chooser.c @@ -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, -- cgit v1.2.3