]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwidgets/dialogs/playlist.cpp
playlist: Make sure we don't pl_Release(p_playlist).
[vlc] / modules / gui / wxwidgets / dialogs / playlist.cpp
index 4faf317afdb90945f19f83a05ced3fa2f23efdc6..9ca6fc98ff4a4cf1cc62e92e66a56a2cd23cddf5 100644 (file)
@@ -424,7 +424,7 @@ Playlist::~Playlist()
     var_DelCallback( p_playlist, "intf-change", PlaylistChanged, this );
     var_DelCallback( p_playlist, "item-append", ItemAppended, this );
     var_DelCallback( p_playlist, "item-deleted", ItemDeleted, this );
-    pl_Release( p_playlist );
+    vlc_object_release( p_playlist );
 }
 
 /**********************************************************************
@@ -1287,8 +1287,8 @@ bool PlaylistFileDropTarget::OnDropFiles( wxCoord x, wxCoord y,
         char *psz_utf8 = wxDnDFromLocale( filenames[i] );
         input_item_t *p_input = input_ItemNew( p->p_playlist,
                                               psz_utf8, psz_utf8 );
-        int i_ret = ( playlist_NodeAddInput( p->p_playlist, p_input, p_dest,
-                PLAYLIST_PREPARSE, i_pos, false ) != VLC_SUCCESS );
+        int i_ret = ( playlist_BothAddInput( p->p_playlist, p_input, p_dest,
+                PLAYLIST_PREPARSE, i_pos, NULL, NULL, pl_Unlocked ) != VLC_SUCCESS );
         vlc_gc_decref( p_input );
         wxDnDLocaleFree( psz_utf8 );
         if( i_ret != VLC_SUCCESS )