]> git.sesse.net Git - vlc/commitdiff
Works around an issue with some playlist items added by the sap interface : since...
authorBenjamin Pracht <bigben@videolan.org>
Tue, 30 Mar 2004 20:56:13 +0000 (20:56 +0000)
committerBenjamin Pracht <bigben@videolan.org>
Tue, 30 Mar 2004 20:56:13 +0000 (20:56 +0000)
This doesn't correct this issue, but at least, it doesn't prevent the item proprieties window from opening anymore.

modules/gui/macosx/playlistinfo.m

index c586d4998c581c54857b33480ed9e30dd6696280..1ea18cd840a41003f2e4205dae7b7805682d4bfb 100644 (file)
         {
             /*fill uri / title / author info */
             int i_item = [o_vlc_playlist selectedPlaylistItem];
-            [o_uri_txt setStringValue:[NSString stringWithUTF8String: p_playlist->pp_items[i_item]->psz_uri]];
-            [o_title_txt setStringValue:[NSString stringWithUTF8String: p_playlist->pp_items[i_item]->psz_name]];
+            [o_uri_txt setStringValue:
+                ([NSString stringWithUTF8String:p_playlist->
+                    pp_items[i_item]->psz_uri] == nil ) ?
+                @"" :
+                [NSString stringWithUTF8String:p_playlist->
+                    pp_items[i_item]->psz_uri]];
+
+            [o_title_txt setStringValue:
+                ([NSString stringWithUTF8String:p_playlist->
+                    pp_items[i_item]->psz_name] == nil ) ?
+                @"" :
+                [NSString stringWithUTF8String:p_playlist->
+                    pp_items[i_item]->psz_name]];
+
             [o_author_txt setStringValue:[NSString stringWithUTF8String: playlist_GetInfo(p_playlist, i_item ,_("General"),_("Author") )]];
 
             [[VLCInfoTreeItem rootItem] refresh];