Commit b7b5049b authored by Felix Paul Kühne's avatar Felix Paul Kühne

Prevent runtime exception

parent ed5576f8
......@@ -110,12 +110,14 @@
- (void)downloadFileToDocumentFolder:(BoxItem *)file
{
if ([file.type isEqualToString:BoxAPIItemTypeFolder]) return;
if (file != nil) {
if ([file.type isEqualToString:BoxAPIItemTypeFolder]) return;
if (!_listOfBoxFilesToDownload)
_listOfBoxFilesToDownload = [NSMutableArray new];
if (!_listOfBoxFilesToDownload)
_listOfBoxFilesToDownload = [NSMutableArray new];
[_listOfBoxFilesToDownload addObject:file];
[_listOfBoxFilesToDownload addObject:file];
}
if ([self.delegate respondsToSelector:@selector(numberOfFilesWaitingToBeDownloadedChanged)])
[self.delegate numberOfFilesWaitingToBeDownloadedChanged];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment