[vlc-commits] Qt: fix deadlock on sort

Francois Cartegnie git at videolan.org
Sun Jul 24 19:35:57 CEST 2016


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Jul 24 19:33:44 2016 +0200| [664e991d5b753bcb7a37dc71132d64e785f5de5f] | committer: Francois Cartegnie

Qt: fix deadlock on sort

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

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

diff --git a/modules/gui/qt/components/playlist/playlist_model.cpp b/modules/gui/qt/components/playlist/playlist_model.cpp
index 3f03209..e8c881c 100644
--- a/modules/gui/qt/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt/components/playlist/playlist_model.cpp
@@ -820,13 +820,13 @@ void PLModel::sort( QModelIndex caller, QModelIndex rootIndex, const int column,
                                         order == Qt::AscendingOrder ?
                                             ORDER_NORMAL : ORDER_REVERSE );
         }
-    }
 
-    if( count )
-    {
-        beginInsertRows( qIndex, 0, count - 1 );
-        updateChildren( item );
-        endInsertRows( );
+        if( count )
+        {
+            beginInsertRows( qIndex, 0, count - 1 );
+            updateChildren( item );
+            endInsertRows( );
+        }
     }
 
     /* if we have popup item, try to make sure that you keep that item visible */



More information about the vlc-commits mailing list