[evolution-mapi] Bug #651709 - Crash on deselect in new calendar folder tree
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Bug #651709 - Crash on deselect in new calendar folder tree
- Date: Fri, 19 Aug 2011 11:04:34 +0000 (UTC)
commit bc49d37df1e1c9d96fe14889548ba7051e84808f
Author: Milan Crha <mcrha redhat com>
Date: Fri Aug 19 13:03:58 2011 +0200
Bug #651709 - Crash on deselect in new calendar folder tree
.../exchange-mapi-account-setup.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-setup.c b/src/account-setup-eplugin/exchange-mapi-account-setup.c
index 24fcbc7..7c77e8c 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-setup.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-setup.c
@@ -678,15 +678,17 @@ exchange_mapi_cursor_change (GtkTreeView *treeview, ESource *source)
GtkTreeModel *model;
GtkTreeIter iter;
mapi_id_t pfid;
- gchar *sfid=NULL;
+ gchar *sfid = NULL;
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
- gtk_tree_selection_get_selected(selection, &model, &iter);
-
- gtk_tree_model_get (model, &iter, FID_COL, &pfid, -1);
- sfid = exchange_mapi_util_mapi_id_to_string (pfid);
- e_source_set_property (source, "parent-fid", sfid);
- g_free (sfid);
+ if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
+ gtk_tree_model_get (model, &iter, FID_COL, &pfid, -1);
+ sfid = exchange_mapi_util_mapi_id_to_string (pfid);
+ e_source_set_property (source, "parent-fid", sfid);
+ g_free (sfid);
+ } else {
+ e_source_set_property (source, "parent-fid", NULL);
+ }
}
static GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]