From: Ilkka Ollakka Date: Wed, 23 Jun 2010 11:37:30 +0000 (+0300) Subject: Qt4: add check if current isValid() X-Git-Tag: 1.2.0-pre1~6087 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e7fcaab6ff49da28d84ba319ef7f75afd0a90b41;p=vlc Qt4: add check if current isValid() --- diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 2c1fb7644e..2e27bc015b 100644 --- a/modules/gui/qt4/components/playlist/playlist_model.cpp +++ b/modules/gui/qt4/components/playlist/playlist_model.cpp @@ -391,7 +391,7 @@ bool PLModel::isParent( const QModelIndex &index, const QModelIndex ¤t ) c if( index == current ) return true; - if( !current.parent().isValid() ) + if( !current.isValid() || !current.parent().isValid() ) return false; return isParent( index, current.parent() );