mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
Qt4: check that index.isValid too
This commit is contained in:
parent
bed0b78014
commit
f9fe9f2944
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user