]> git.sesse.net Git - vlc/commitdiff
Qt4: add check if current isValid()
authorIlkka Ollakka <ileoo@videolan.org>
Wed, 23 Jun 2010 11:37:30 +0000 (14:37 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Wed, 23 Jun 2010 11:37:30 +0000 (14:37 +0300)
modules/gui/qt4/components/playlist/playlist_model.cpp

index 2c1fb7644e2f206f7bcf4b361d3648fc2c773f36..2e27bc015bd660efe4cf9ba39fd8f3e35797daa5 100644 (file)
@@ -391,7 +391,7 @@ bool PLModel::isParent( const QModelIndex &index, const QModelIndex &current ) c
     if( index == current )
         return true;
 
-    if( !current.parent().isValid() )
+    if( !current.isValid() || !current.parent().isValid() )
         return false;
 
     return isParent( index, current.parent() );