diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index a05e92e649..970d73a891 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -2,6 +2,9 @@ * 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. 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; } |