diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index cb17b8b31a..6c5f3b5693 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -329,6 +329,12 @@ fetch_mail_fetch(struct _mail_msg *mm) if (m->cancel) camel_operation_unregister(m->cancel); + + /* we unref this here as it may have more work to do (syncing + folders and whatnot) before we are really done */ + /* should this be cancellable too? (i.e. above unregister above) */ + camel_object_unref((CamelObject *)m->fmsg.driver); + m->fmsg.driver = NULL; } static void @@ -336,11 +342,6 @@ fetch_mail_fetched(struct _mail_msg *mm) { struct _fetch_mail_msg *m = (struct _fetch_mail_msg *)mm; - /* we unref this here as it may have more work to do (syncing - folders and whatnot) before we are really done */ - camel_object_unref((CamelObject *)m->fmsg.driver); - m->fmsg.driver = NULL; - if (m->done) m->done(m->source_uri, m->data); } |