aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/async/imap
diff options
context:
space:
mode:
Diffstat (limited to 'src/async/imap')
-rw-r--r--src/async/imap/MCIMAPOperation.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/async/imap/MCIMAPOperation.cc b/src/async/imap/MCIMAPOperation.cc
index a983fe55..35eedd6c 100644
--- a/src/async/imap/MCIMAPOperation.cc
+++ b/src/async/imap/MCIMAPOperation.cc
@@ -94,8 +94,10 @@ void IMAPOperation::bodyProgress(IMAPSession * session, unsigned int current, un
void IMAPOperation::bodyProgressOnMainThread(void * ctx)
{
- if (isCancelled())
+ if (isCancelled()) {
+ release();
return;
+ }
struct progressContext * context = (struct progressContext *) ctx;
if (mImapCallback != NULL) {
@@ -107,10 +109,8 @@ void IMAPOperation::bodyProgressOnMainThread(void * ctx)
void IMAPOperation::itemsProgress(IMAPSession * session, unsigned int current, unsigned int maximum)
{
- if (isCancelled()) {
- release();
+ if (isCancelled())
return;
- }
struct progressContext * context = (struct progressContext *) calloc(sizeof(* context), 1);
context->current = current;