(cherry picked from commit 2c7e82b5bb98dc86a8ab16d54eab52906a9dc609)
@@ -344,7 +344,9 @@
for (NSUInteger index = 0; index < itemsCount; ++index) {
NSIndexPath *indexPath = [NSIndexPath indexPathForItem:index inSection:section];
id<VLCLocalNetworkService> service = [discoveryController networkServiceForIndexPath:indexPath];
- [newNetworkServices addObject:service];
+ if (service != nil) {
+ [newNetworkServices addObject:service];
+ }
}