aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-folder-tree.c
diff options
context:
space:
mode:
authorjacob berkman <jacob@ximian.com>2001-05-15 02:58:39 +0800
committerJacob Berkman <jberkman@src.gnome.org>2001-05-15 02:58:39 +0800
commit02ff1e11ae73af6c2b90108b5228158505478ed0 (patch)
tree84c7985bd33a27424de47fe91b8f32f94f94b35f /shell/e-folder-tree.c
parentd77e174e5642e9300092b27574633b7909027e49 (diff)
downloadgsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.gz
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.tar.zst
gsoc2013-evolution-02ff1e11ae73af6c2b90108b5228158505478ed0.zip
set the subfolder's parent to NULL so the subfolder list doesn't change
2001-05-14 jacob berkman <jacob@ximian.com> * e-folder-tree.c (remove_folder): set the subfolder's parent to NULL so the subfolder list doesn't change whilst we are using it (folder_remove_subfolder): this function didn't used to work at all svn path=/trunk/; revision=9795
Diffstat (limited to 'shell/e-folder-tree.c')
-rw-r--r--shell/e-folder-tree.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/e-folder-tree.c b/shell/e-folder-tree.c
index bdafea8734..e878bd24d6 100644
--- a/shell/e-folder-tree.c
+++ b/shell/e-folder-tree.c
@@ -107,7 +107,8 @@ static void
folder_remove_subfolder (Folder *folder,
Folder *subfolder)
{
- g_list_remove (folder->subfolders, folder);
+ folder->subfolders = g_list_remove (folder->subfolders, subfolder);
+ subfolder->parent = NULL;
}
static void
@@ -142,6 +143,7 @@ remove_folder (EFolderTree *folder_tree,
Folder *subfolder;
subfolder = (Folder *) p->data;
+ subfolder->parent = NULL;
remove_folder (folder_tree, subfolder);
}