浏览代码

Fix runtime exception

Felix Paul Kühne 9 年之前
父节点
当前提交
d71bf1bd8b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Sources/VLCMovieViewController.m

+ 5 - 0
Sources/VLCMovieViewController.m

@@ -644,6 +644,11 @@ typedef NS_ENUM(NSInteger, VLCPanType) {
 
 - (void)idleTimerExceeded
 {
+    if (![NSThread isMainThread]) {
+        [self performSelectorOnMainThread:@selector(idleTimerExceeded) withObject:nil waitUntilDone:NO];
+        return;
+    }
+
     _idleTimer = nil;
     if (!_controlsHidden)
         [self toggleControlsVisible];