From 616d587c2f9a6c79da57aca29a0d56e1f5521e10 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Fri, 2 Nov 2007 20:21:53 +0000 Subject: [PATCH] don't crash when trying to mapping an invalid proxy index in the group proxy model svn path=/trunk/KDE/kdegraphics/okular/; revision=732110 --- ui/annotationproxymodels.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 ) {