[vlc-commits] commit: Qt4: check that index.isValid too (Ilkka Ollakka )
git at videolan.org
git at videolan.org
Thu Jun 24 23:18:28 CEST 2010
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Thu Jun 24 18:06:25 2010 +0300| [f9fe9f294474e6c286ff458522e5dd373f92564d] | committer: Ilkka Ollakka
Qt4: check that index.isValid too
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f9fe9f294474e6c286ff458522e5dd373f92564d
---
.../gui/qt4/components/playlist/playlist_model.cpp | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 75d885b..a1f1412 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -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 ¤t ) const
{
+ if( !index.isValid() )
+ return false;
+
if( index == current )
return true;
More information about the vlc-commits
mailing list