]> git.sesse.net Git - vlc/commitdiff
Qt4: check that index.isValid too
authorIlkka Ollakka <ileoo@videolan.org>
Thu, 24 Jun 2010 15:06:25 +0000 (18:06 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Thu, 24 Jun 2010 19:56:17 +0000 (22:56 +0300)
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;