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

Fix runtime exception

parent 4f76a13c
......@@ -128,10 +128,14 @@
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath
{
id<VLCNetworkServerBrowserItem> item = self.serverBrowser.items[indexPath.row];
NSArray *items = self.serverBrowser.items;
NSInteger row = indexPath.row;
if (row < items.count) {
id<VLCNetworkServerBrowserItem> item = items[row];
if ([cell conformsToProtocol:@protocol(VLCRemoteBrowsingCell)]) {
[self.browsingController configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:item];
if ([cell conformsToProtocol:@protocol(VLCRemoteBrowsingCell)]) {
[self.browsingController configureCell:(id<VLCRemoteBrowsingCell>)cell withItem:item];
}
}
}
......
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