[vlc-commits] commit: Qt4: add check if current isValid() (Ilkka Ollakka )

git at videolan.org git at videolan.org
Wed Jun 23 13:41:46 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jun 23 14:37:30 2010 +0300| [e7fcaab6ff49da28d84ba319ef7f75afd0a90b41] | committer: Ilkka Ollakka 

Qt4: add check if current isValid()

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

 .../gui/qt4/components/playlist/playlist_model.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 2c1fb76..2e27bc0 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 &current ) c
     if( index == current )
         return true;
 
-    if( !current.parent().isValid() )
+    if( !current.isValid() || !current.parent().isValid() )
         return false;
 
     return isParent( index, current.parent() );



More information about the vlc-commits mailing list