aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-02-26 14:10:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-02-26 14:10:40 +0800
commitd9d3e0d6275d7cb7bb85e7bbc096cf86d3fea3a2 (patch)
tree98cee2b7e6199a37914c5b1e06be4cf6f8f0d530
parent1bc1b31cc0bb9cd102da768b3d6a32f7fbe02fc2 (diff)
downloadgsoc2013-evolution-d9d3e0d6275d7cb7bb85e7bbc096cf86d3fea3a2.tar.gz
gsoc2013-evolution-d9d3e0d6275d7cb7bb85e7bbc096cf86d3fea3a2.tar.zst
gsoc2013-evolution-d9d3e0d6275d7cb7bb85e7bbc096cf86d3fea3a2.zip
Make sure the folder is non-NULL before trying to remove it from the
2003-02-26 Jeffrey Stedfast <fejj@ximian.com> * camel-store.c (camel_store_delete_folder): Make sure the folder is non-NULL before trying to remove it from the store's object-bag. svn path=/trunk/; revision=20067
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-store.c13
2 files changed, 13 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 29be0f4807..8c8c790ffc 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-26 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-store.c (camel_store_delete_folder): Make sure the folder
+ is non-NULL before trying to remove it from the store's
+ object-bag.
+
2003-02-25 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-part-utils.c
diff --git a/camel/camel-store.c b/camel/camel-store.c
index e023460bf6..35adf8c6cd 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -333,12 +333,13 @@ camel_store_delete_folder (CamelStore *store, const char *folder_name, CamelExce
}
CS_CLASS (store)->delete_folder (store, folder_name, ex);
-
- if (store->folders)
- camel_object_bag_remove(store->folders, folder);
-
- if (folder)
- camel_object_unref(folder);
+
+ if (folder) {
+ if (store->folders)
+ camel_object_bag_remove (store->folders, folder);
+
+ camel_object_unref (folder);
+ }
CAMEL_STORE_UNLOCK(store, folder_lock);
}