aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-send-recv.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-01-24 05:50:24 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-24 05:50:24 +0800
commit27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa (patch)
treee86e4a4e69d9d61f10ca3c5e013f6b4b299e8f5b /mail/mail-send-recv.c
parente31cd9c18fe326dae5fe4c0b26a47cc75448a61c (diff)
downloadgsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar.gz
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar.bz2
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar.lz
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar.xz
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.tar.zst
gsoc2013-evolution-27c3aaec835e19dfbe16d8130d0d5bd1dc5f30aa.zip
Make sure the source->url is not NULL (which is perfectly valid).
2001-01-23 Jeffrey Stedfast <fejj@ximian.com> * mail-send-recv.c (build_dialogue): Make sure the source->url is not NULL (which is perfectly valid). (mail_send_receive): Where oh where should my prototype be? (receive_get_folder): Make sure to ref the folder before you add it to the hash table. * openpgp-utils.c: * mail-crypto.c: A few minor tweaks. svn path=/trunk/; revision=7757
Diffstat (limited to 'mail/mail-send-recv.c')
-rw-r--r--mail/mail-send-recv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 88dabcae55..088339575f 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -31,6 +31,7 @@
#include "evolution-storage.h"
+#include "mail.h"
#include "mail-mt.h"
#include "mail-config.h"
#include "mail-session.h"
@@ -438,6 +439,10 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep
/* we recheck that the folder hasn't snuck in while we were loading it ... */
/* and we assume the newer one is the same, but unref the old one anyway */
g_mutex_lock(info->data->lock);
+
+ /* NotZed: I added this ref here, if I'm wrong feel free to remove it */
+ camel_object_ref (CAMEL_OBJECT (folder));
+
if (g_hash_table_lookup_extended(info->data->folders, uri, (void **)&oldkey, (void **)&oldinfo)) {
camel_object_unref((CamelObject *)oldinfo->folder);
oldinfo->folder = folder;
@@ -448,7 +453,7 @@ receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelExcep
g_hash_table_insert(info->data->folders, oldinfo->uri, oldinfo);
}
g_mutex_unlock(info->data->lock);
-
+
return folder;
}