aboutsummaryrefslogtreecommitdiffhomepage
path: root/example/mac
diff options
context:
space:
mode:
Diffstat (limited to 'example/mac')
-rw-r--r--example/mac/macExample/macExample/MCTMsgViewController.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/example/mac/macExample/macExample/MCTMsgViewController.m b/example/mac/macExample/macExample/MCTMsgViewController.m
index adfa009c..e0205867 100644
--- a/example/mac/macExample/macExample/MCTMsgViewController.m
+++ b/example/mac/macExample/macExample/MCTMsgViewController.m
@@ -186,7 +186,9 @@ typedef void (^DownloadCallback)(NSError * error);
[op setProgress:^(unsigned int current, unsigned int maximum) {
NSLog(@"progress content: %u/%u", current, maximum);
}];
- [_ops addObject:op];
+ if (op != nil) {
+ [_ops addObject:op];
+ }
if (downloadFinished != NULL) {
NSMutableArray * blocks;
blocks = [_callbacks objectForKey:partUniqueID];