From 54b4a20e07a4566d34a256039b36505c5b1f64b1 Mon Sep 17 00:00:00 2001 From: Jaydeep Solanki Date: Tue, 15 Jan 2013 01:20:59 +0100 Subject: [PATCH] No need to prepare for reloading if there's nothing to reload Part of review 108404 The other part was fixed in the previous commit in a different way REVIEW: 108404 --- ui/toc.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 );