Explorar o código

Fix runtime exception

Felix Paul Kühne %!s(int64=9) %!d(string=hai) anos
pai
achega
9efd33efa1
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      Sources/VLCPlayerDisplayController.m

+ 4 - 0
Sources/VLCPlayerDisplayController.m

@@ -248,6 +248,10 @@ static NSString *const VLCPlayerDisplayControllerDisplayModeKey = @"VLCPlayerDis
 
 - (void)_presentFullscreenPlaybackViewIfNeeded
 {
+    if (![NSThread isMainThread]) {
+        [self performSelectorOnMainThread:@selector(_presentFullscreenPlaybackViewIfNeeded) withObject:nil waitUntilDone:NO];
+        return;
+    }
     if (!self.movieViewController.presentingViewController) {
         [self _presentMovieViewControllerAnimated:[self shouldAnimate]];
     }