Commit 96ae09cf authored by Pino Toscano's avatar Pino Toscano

ignore setViewport() for page numbers out of the document

CCBUG: 266133

svn path=/trunk/KDE/kdegraphics/okular/; revision=1220028
parent 083de3d1
......@@ -2444,6 +2444,11 @@ void Document::setViewport( const DocumentViewport & viewport, int excludeId, bo
kDebug(OkularDebug) << "invalid viewport:" << viewport.toString();
return;
}
if ( viewport.pageNumber >= int(d->m_pagesVector.count()) )
{
//kDebug(OkularDebug) << "viewport out of document:" << viewport.toString();
return;
}
// if already broadcasted, don't redo it
DocumentViewport & oldViewport = *d->m_viewportIterator;
......
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