mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 03:30:20 +00:00
Do not crash on right-click on TOC item with no associated page
BUGS: 396326
This commit is contained in:
parent
8061f4c098
commit
14dc396cdb
|
@ -2946,7 +2946,7 @@ const QList<EmbeddedFile*> *Document::embeddedFiles() const
|
|||
|
||||
const Page * Document::page( int n ) const
|
||||
{
|
||||
return ( n < d->m_pagesVector.count() ) ? d->m_pagesVector.at(n) : 0;
|
||||
return ( n >= 0 && n < d->m_pagesVector.count() ) ? d->m_pagesVector.at(n) : nullptr;
|
||||
}
|
||||
|
||||
const DocumentViewport & Document::viewport() const
|
||||
|
|
Loading…
Reference in a new issue