From f9fe9f294474e6c286ff458522e5dd373f92564d Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Thu, 24 Jun 2010 18:06:25 +0300 Subject: [PATCH] Qt4: check that index.isValid too --- modules/gui/qt4/components/playlist/playlist_model.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp index 75d885bf2e..a1f1412e0a 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; -- 2.39.2