소스 검색

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