]> git.sesse.net Git - vlc/commitdiff
macosx: another sanity check since in rare circumstances an input's URL may be nil
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 11 Nov 2012 15:00:47 +0000 (16:00 +0100)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 11 Nov 2012 15:02:53 +0000 (16:02 +0100)
modules/gui/macosx/MainWindow.m

index 9e649d4deab28e0303f311e8b7099299ddaa4be8..42f90176a3cabfd9236485e5581601229c328435 100644 (file)
@@ -644,12 +644,18 @@ static VLCMainWindow *_o_sharedInstance = nil;
                 aString = [o_url absoluteString];
         }
 
-        [self setTitle: aString];
-        [[[VLCMain sharedInstance] voutController] updateWindowsUsingBlock:^(VLCVideoWindowCommon *o_window) {
-            [o_window setTitle:aString];
-        }];
+        if ([aString length] > 0) {
+            [self setTitle: aString];
+            [[[VLCMain sharedInstance] voutController] updateWindowsUsingBlock:^(VLCVideoWindowCommon *o_window) {
+                [o_window setTitle:aString];
+            }];
+
+            [o_fspanel setStreamTitle: aString];
+        } else {
+           [self setTitle: _NS("VLC media player")];
+            [self setRepresentedURL: nil];
+        }
 
-        [o_fspanel setStreamTitle: aString];
         vlc_object_release(p_input);
     } else {
         [self setTitle: _NS("VLC media player")];