Pārlūkot izejas kodu

Fix runtime exception

Felix Paul Kühne 9 gadi atpakaļ
vecāks
revīzija
b8f304be2e
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      Sources/VLCPlayerDisplayController.m

+ 2 - 0
Sources/VLCPlayerDisplayController.m

@@ -88,6 +88,8 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
 - (void)setupChildViewController
 {
     UIViewController *childViewController = self.childViewController;
+    if (childViewController == nil)
+        return;
     [self addChildViewController:childViewController];
     [self.view addSubview:childViewController.view];
     [childViewController didMoveToParentViewController:self];