]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/playlist/playlist_model.cpp
Qt4: check that index.isValid too
[vlc] / modules / gui / qt4 / components / playlist / playlist_model.cpp
index 75d885bf2e763083bf92686f42fcc193595e12c2..a1f1412e0a90183f302e51ee2b7fd109dea28067 100644 (file)
@@ -388,6 +388,9 @@ QVariant PLModel::data( const QModelIndex &index, int role ) const
 /* Seek from current index toward the top and see if index is one of parent nodes */
 bool PLModel::isParent( const QModelIndex &index, const QModelIndex &current ) const
 {
+    if( !index.isValid() )
+        return false;
+
     if( index == current )
         return true;