瀏覽代碼

Fix runtime exception

Felix Paul Kühne 9 年之前
父節點
當前提交
9efd33efa1
共有 1 個文件被更改,包括 4 次插入0 次删除
  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]];
     }