mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-25 10:55:37 +00:00
Qt decided to start passing invalid indexes to mapFromSource, do not crash on them
BUGS: 291278 FIXED-IN: 4.8.0
This commit is contained in:
parent
b9acd7f3d9
commit
2c9122192d
|
@ -405,6 +405,9 @@ QModelIndex AuthorGroupProxyModel::parent( const QModelIndex &index ) const
|
|||
|
||||
QModelIndex AuthorGroupProxyModel::mapFromSource( const QModelIndex &sourceIndex ) const
|
||||
{
|
||||
if ( !sourceIndex.isValid() )
|
||||
return QModelIndex();
|
||||
|
||||
const AuthorGroupItem *item = d->mRoot->findIndex( sourceIndex );
|
||||
if ( !item )
|
||||
return QModelIndex();
|
||||
|
|
Loading…
Reference in a new issue