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

onedrive: prevent exceptions

(cherry picked from commit 285dff51)
parent 10265946
......@@ -174,8 +174,10 @@
else if (self.oneDriveFile.isVideo) {
self.thumbnailView.image = [UIImage imageNamed:@"movie"];
if (_oneDriveFile.thumbnailURL != nil) {
_iconURL = [NSURL URLWithString:_oneDriveFile.thumbnailURL];
[self performSelectorInBackground:@selector(_updateIconFromURL) withObject:@""];
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];
cell.oneDriveFile = _oneDriveController.currentFolder.items[indexPath.row];
cell.delegate = self;
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