diff --git a/ui/toc.cpp b/ui/toc.cpp index 7e284f380..bfb0c5a48 100644 --- a/ui/toc.cpp +++ b/ui/toc.cpp @@ -84,6 +84,9 @@ void TOC::notifyCurrentPageChanged( int, int ) void TOC::prepareForReload() { + if( m_model->isEmpty() ) + return; + const QVector list = expandedNodes(); TOCModel *m = m_model; m_model = new TOCModel( m_document, m_treeView );