浏览代码

macosx/framework: Don't accept nil mediaPlayer.

Pierre d'Herbemont 15 年之前
父节点
当前提交
40012d3442
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Sources/VLCExtensionsManager.m

+ 6 - 0
Sources/VLCExtensionsManager.m

@@ -104,6 +104,12 @@ static VLCExtensionsManager *sharedManager = nil;
 {
     if (_player == player)
         return;
+
+    // Don't set a NULL mediaPlayer.
+    // so that we always have an input around.
+    if (!player)
+        return;
+
     NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
     [center removeObserver:self name:VLCMediaPlayerStateChanged object:_player];