浏览代码

fix crash when user repeatedly and quickly pressed arrow button to present info VC

Tobias Conradi 9 年之前
父节点
当前提交
e3c343e772
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Apple-TV/Playback/VLCFullscreenMovieTVViewController.m

+ 5 - 0
Apple-TV/Playback/VLCFullscreenMovieTVViewController.m

@@ -268,6 +268,11 @@ typedef NS_ENUM(NSInteger, VLCPlayerScanState)
     }
     // TODO: configure with player info
     VLCPlaybackInfoTVViewController *infoViewController = self.infoViewController;
+
+    // prevent repeated presentation when users repeatedly and quickly press the arrow button
+    if (infoViewController.isBeingPresented) {
+        return;
+    }
     infoViewController.transitioningDelegate = self;
     [self presentViewController:infoViewController animated:YES completion:nil];
     [self animatePlaybackControlsToVisibility:NO];