[vlc-commits] Qt: don't remove non deleted items

Francois Cartegnie git at videolan.org
Sun May 8 16:02:42 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun May  8 15:45:27 2016 +0200| [851cd5d27e4cbca755665631194f82bc0c6a12e8] | committer: Francois Cartegnie

Qt: don't remove non deleted items

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=851cd5d27e4cbca755665631194f82bc0c6a12e8
---

 modules/gui/qt/components/playlist/playlist_model.cpp |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 5a8986c..1363931 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -756,10 +756,11 @@ void PLModel::doDelete( QModelIndexList selected )
             recurseDelete( item->children, &selected );
 
         PL_LOCK;
-        playlist_DeleteFromInput( p_playlist, item->inputItem(), pl_Locked );
+        int i_ret = playlist_DeleteFromInput( p_playlist, item->inputItem(), pl_Locked );
         PL_UNLOCK;
 
-        removeItem( item );
+        if( i_ret == VLC_SUCCESS )
+            removeItem( item );
     }
 }
 



More information about the vlc-commits mailing list