diff options
author | Milan Crha <mcrha@redhat.com> | 2013-03-25 21:17:06 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-03-25 21:17:06 +0800 |
commit | 286202150c032176448c00e436c508ad713bcebd (patch) | |
tree | 1301359b0714664bdeeb678b713729e3491fbce8 /libemail-engine | |
parent | 6dc98a04b5ce563561591b37007dfdf712d18fab (diff) | |
download | gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar.gz gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar.bz2 gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar.lz gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar.xz gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.tar.zst gsoc2013-evolution-286202150c032176448c00e436c508ad713bcebd.zip |
Bug #687412 - Crash under mail_folder_cache_service_removed()
Diffstat (limited to 'libemail-engine')
-rw-r--r-- | libemail-engine/mail-folder-cache.c | 10 |
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) |