Explorar o código

macosx/framework: Don't accept nil mediaPlayer.

Pierre d'Herbemont %!s(int64=15) %!d(string=hai) anos
pai
achega
40012d3442
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  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];