X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2Fplaylist.m;h=5e01eda7cbdf8c4d0308eb18b3a357497de148ad;hb=de587c237065de4696d9d035d0504cdf34990d87;hp=f9e6e8efd6a3c8b7b65c5e695148eba63f3b3fa8;hpb=8a5d95d032dd1d3773858ece1d5efe2f970d6bab;p=vlc diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index f9e6e8efd6..5e01eda7cb 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -217,9 +217,9 @@ if( p_item ) i_return = p_item->i_children; } - vlc_object_release( p_playlist ); + pl_Release( VLCIntf ); - return (i_return > 0); + return (i_return >= 0); } /* retrieve the string values for the cells */ @@ -1350,24 +1350,25 @@ int ret_v; char *psz_name = NULL; - playlist_item_t * p_item; ret_v = intf_UserStringInput( p_playlist, _("New Node"), _("Please enter a name for the new node."), &psz_name ); - if( ret_v != DIALOG_CANCELLED && psz_name && *psz_name ) - p_item = playlist_NodeCreate( p_playlist, psz_name, + PL_LOCK; + if( ret_v != DIALOG_CANCELLED && psz_name ) + { + playlist_NodeCreate( p_playlist, psz_name, p_playlist->p_local_category, 0, NULL ); + } else if(! config_GetInt( p_playlist, "interact" ) ) { /* in case that the interaction is disabled, just give it a bogus name */ - p_item = playlist_NodeCreate( p_playlist, _("Empty Folder"), + playlist_NodeCreate( p_playlist, _("Empty Folder"), p_playlist->p_local_category, 0, NULL ); } + PL_UNLOCK; - if(! p_item ) - msg_Warn( VLCIntf, "node creation failed or cancelled by user" ); - - vlc_object_release( p_playlist ); + free( psz_name ); + pl_Release( VLCIntf ); [ourPool release]; }