diff --git a/ui/toc.cpp b/ui/toc.cpp index 182366858..9c84b7590 100644 --- a/ui/toc.cpp +++ b/ui/toc.cpp @@ -156,7 +156,8 @@ void TOC::notifyViewportChanged( bool /*smoothMove*/ ) if ( p == newpage ) { m_current = tmp; - m_current->setSelected( true ); + if (m_current) + m_current->setSelected( true ); } ++it; }