diff --git a/ui/annotationproxymodels.cpp b/ui/annotationproxymodels.cpp index 00b2d08f9..f2c08fe08 100644 --- a/ui/annotationproxymodels.cpp +++ b/ui/annotationproxymodels.cpp @@ -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 ) {