Commit 2c912219 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Qt decided to start passing invalid indexes to mapFromSource, do not crash on them

BUGS: 291278
FIXED-IN: 4.8.0
parent b9acd7f3
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment