[empathy: 8/80] account_chooser_find_account_foreach: check the col type



commit 04d3b8f34e0cab394ac143b9323bd3d00a8abee7
Author: Emilio Pozuelo Monfort <emilio pozuelo collabora co uk>
Date:   Wed Apr 20 09:29:02 2011 +0100

    account_chooser_find_account_foreach: check the col type
    
    As non ROW_ACCOUNT rows don't have an account.

 libempathy-gtk/empathy-account-chooser.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index f91ae23..bfacbd1 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -721,8 +721,15 @@ account_chooser_find_account_foreach (GtkTreeModel *model,
 {
 	FindAccountData *data = user_data;
 	TpAccount  *account;
+	RowType type;
 
-	gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
+	gtk_tree_model_get (model, iter,
+		COL_ACCOUNT_POINTER, &account,
+		COL_ACCOUNT_ROW_TYPE, &type,
+		 -1);
+
+	if (type != ROW_ACCOUNT)
+		return FALSE;
 
 	if (account == data->account) {
 		data->found = TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]