Jelajahi Sumber

Fix runtime exception

Felix Paul Kühne 9 tahun lalu
induk
melakukan
b8f304be2e
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  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];