Prechádzať zdrojové kódy

macosx/framework: Don't accept nil mediaPlayer.

Pierre d'Herbemont 15 rokov pred
rodič
commit
40012d3442
1 zmenil súbory, kde vykonal 6 pridanie a 0 odobranie
  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];