aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/imap/MCOIMAPFetchContentOperation.mm
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-03-26 22:35:41 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2013-03-26 22:35:41 -0700
commit35cf435e289ae5de353a7b67b28a5d982c124d5d (patch)
tree6cc19507928fd2f4fb5e05506d8f56c274053dc5 /src/objc/imap/MCOIMAPFetchContentOperation.mm
parent26495360bb02102ab1a99734223ba634a2c7efaf (diff)
Check if progress block is nil before calling it.
Diffstat (limited to 'src/objc/imap/MCOIMAPFetchContentOperation.mm')
-rw-r--r--src/objc/imap/MCOIMAPFetchContentOperation.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/objc/imap/MCOIMAPFetchContentOperation.mm b/src/objc/imap/MCOIMAPFetchContentOperation.mm
index 49bdee1d..d4e4192b 100644
--- a/src/objc/imap/MCOIMAPFetchContentOperation.mm
+++ b/src/objc/imap/MCOIMAPFetchContentOperation.mm
@@ -58,7 +58,9 @@ typedef void (^completionType)(NSError *error, NSData * data);
- (void) bodyProgress:(unsigned int)current maximum:(unsigned int)maximum
{
- _progress(current, maximum);
+ if (_progress != NULL) {
+ _progress(current, maximum);
+ }
}
@end