aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-tree-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-tree-model.c')
-rw-r--r--mail/em-folder-tree-model.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index b264beef31..f6a16d842a 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -515,6 +515,9 @@ em_folder_tree_model_set_selection (EMFolderTreeModel *model,
if (selection != NULL)
g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
+ if (model->priv->selection == selection)
+ return;
+
if (model->priv->selection != NULL) {
g_object_weak_unref (
G_OBJECT (model->priv->selection), (GWeakNotify)
@@ -546,6 +549,9 @@ em_folder_tree_model_set_session (EMFolderTreeModel *model,
{
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
+ if (model->priv->session == session)
+ return;
+
if (session != NULL) {
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_object_ref (session);