浏览代码

ATV: add missing sanity check

(cherry picked from commit 2c7e82b5bb98dc86a8ab16d54eab52906a9dc609)
Felix Paul Kühne 7 年之前
父节点
当前提交
74488f5d4c
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Apple-TV/VLCServerListTVViewController.m

+ 3 - 1
Apple-TV/VLCServerListTVViewController.m

@@ -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];
+            }
         }
     }