aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2013-03-25 21:16:36 +0800
committerMilan Crha <mcrha@redhat.com>2013-03-25 21:16:36 +0800
commit1c35d94851adfab4340464376118eea4d964fc8d (patch)
treee678542f00089980018451f1d054367c91a76e80
parent7bd4880d6c81caa7d785b49e7b05f30e76ead749 (diff)
downloadgsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar.gz
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar.bz2
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar.lz
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar.xz
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.tar.zst
gsoc2013-evolution-1c35d94851adfab4340464376118eea4d964fc8d.zip
Bug #687412 - Crash under mail_folder_cache_service_removed()
-rw-r--r--libemail-engine/mail-folder-cache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libemail-engine/mail-folder-cache.c b/libemail-engine/mail-folder-cache.c
index 2f99e84c57..2bf0bb470c 100644
--- a/libemail-engine/mail-folder-cache.c
+++ b/libemail-engine/mail-folder-cache.c
@@ -841,13 +841,13 @@ update_folders (CamelStore *store,
g_rec_mutex_lock (&ud->cache->priv->stores_mutex);
si = g_hash_table_lookup (ud->cache->priv->stores, store);
- if (si && !g_cancellable_is_cancelled (ud->cancellable)) {
+ if (si) {
/* The 'si' is still there, so we can remove ourselves from
* its list. Or else its not, and we're on our own and free
* anyway. */
g_queue_remove (&si->folderinfo_updates, ud);
- if (fi != NULL)
+ if (fi != NULL && !g_cancellable_is_cancelled (ud->cancellable))
create_folders (ud->cache, fi, si);
}
g_rec_mutex_unlock (&ud->cache->priv->stores_mutex);
@@ -998,6 +998,12 @@ store_go_online_cb (CamelStore *store,
G_PRIORITY_DEFAULT, ud->cancellable,
(GAsyncReadyCallback) update_folders, ud);
} else {
+ StoreInfo *si;
+
+ si = g_hash_table_lookup (ud->cache->priv->stores, store);
+ if (si)
+ g_queue_remove (&si->folderinfo_updates, ud);
+
/* The store vanished, that means we were probably cancelled,
* or at any rate, need to clean ourselves up. */
if (ud->cancellable != NULL)