Commit 285dff51 authored by Felix Paul Kühne's avatar Felix Paul Kühne

onedrive: prevent exceptions

parent f367a603
......@@ -174,9 +174,11 @@
else if (self.oneDriveFile.isVideo) {
self.thumbnailView.image = [UIImage imageNamed:@"movie"];
if (_oneDriveFile.thumbnailURL != nil) {
if (_oneDriveFile.thumbnailURL.length > 0) {
_iconURL = [NSURL URLWithString:_oneDriveFile.thumbnailURL];
[self performSelectorInBackground:@selector(_updateIconFromURL) withObject:@""];
}
}
} else
self.thumbnailView.image = [UIImage imageNamed:@"blank"];
}
......
......@@ -77,8 +77,12 @@
if (cell == nil)
cell = [VLCCloudStorageTableViewCell cellWithReuseIdentifier:CellIdentifier];
NSArray *items = _oneDriveController.currentFolder.items;
if (indexPath.row < items.count) {
cell.oneDriveFile = _oneDriveController.currentFolder.items[indexPath.row];
cell.delegate = self;
}
return cell;
}
......
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