Commit 083de3d1 authored by Pino Toscano's avatar Pino Toscano

do not try to get the label of pages "out of the document"

CCBUG: 266133

svn path=/trunk/KDE/kdegraphics/okular/; revision=1220024
parent dd83975b
......@@ -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;
}
......
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