mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 18:35:37 +00:00
do not try to get the label of pages "out of the document"
CCBUG: 266133 svn path=/trunk/KDE/kdegraphics/okular/; revision=1220024
This commit is contained in:
parent
dd83975be0
commit
083de3d1c4
|
@ -193,7 +193,7 @@ QVariant TOCModel::data( const QModelIndex &index, int role ) const
|
|||
return item->viewport.pageNumber + 1;
|
||||
break;
|
||||
case PageItemDelegate::PageLabelRole:
|
||||
if ( item->viewport.isValid() )
|
||||
if ( item->viewport.isValid() && item->viewport.pageNumber < int(d->document->pages()) )
|
||||
return d->document->page( item->viewport.pageNumber )->label();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue