diff options
Diffstat (limited to 'example')
-rwxr-xr-x | example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm | 6 | ||||
-rw-r--r-- | example/mac/macExample/macExample/MCTMsgViewController.m | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm b/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm index dd2b36ee..ca3aecfc 100755 --- a/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm +++ b/example/ios/iOS UI Test/iOS UI Test/MCTMsgViewController.mm @@ -91,7 +91,7 @@ MCLog("%s is missing, fetching", partUniqueID.description.UTF8String); if ([_pending containsObject:partUniqueID]) { - return NULL; + return nil; } MCOIMAPPart * part = (MCOIMAPPart *) [_message partForUniqueID:partUniqueID]; @@ -205,7 +205,9 @@ typedef void (^DownloadCallback)(NSError * error); [op setProgress:^(unsigned int current, unsigned int maximum) { MCLog("progress content: %u/%u", current, maximum); }]; - [_ops addObject:op]; + if (op != nil) { + [_ops addObject:op]; + } if (downloadFinished != NULL) { NSMutableArray * blocks; blocks = [_callbacks objectForKey:partUniqueID]; diff --git a/example/mac/macExample/macExample/MCTMsgViewController.m b/example/mac/macExample/macExample/MCTMsgViewController.m index dcb6f41c..f26b783f 100644 --- a/example/mac/macExample/macExample/MCTMsgViewController.m +++ b/example/mac/macExample/macExample/MCTMsgViewController.m @@ -76,7 +76,7 @@ NSLog(@"%@ is missing, fetching", partUniqueID); if ([_pending containsObject:partUniqueID]) { - return NULL; + return nil; } MCOIMAPPart * part = (MCOIMAPPart *) [_message partForUniqueID:partUniqueID]; |