don't crash when trying to mapping an invalid proxy index in the group proxy model

svn path=/trunk/KDE/kdegraphics/okular/; revision=732110
This commit is contained in:
Pino Toscano 2007-11-02 20:21:53 +00:00
parent b66872679e
commit 616d587c2f

View file

@ -137,6 +137,9 @@ QModelIndex PageGroupProxyModel::mapFromSource( const QModelIndex &sourceIndex )
QModelIndex PageGroupProxyModel::mapToSource( const QModelIndex &proxyIndex ) const
{
if ( !proxyIndex.isValid() )
return QModelIndex();
if ( mGroupByPage ) {
if ( proxyIndex.internalId() == 0 ) {