]> git.lyx.org Git - features.git/commitdiff
fix crash on buffer-switching (2 tabs) + toc-clicking
authorPeter Kümmel <syntheticpp@gmx.net>
Fri, 19 Jan 2007 22:16:26 +0000 (22:16 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Fri, 19 Jan 2007 22:16:26 +0000 (22:16 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16769 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QToc.C

index 2a355c012eb06515ceaef8d4b32b2b5de7d7f43a..857a4dfde21fbbc1bfc77571a768cf92195918ff 100644 (file)
@@ -103,7 +103,7 @@ QModelIndex const QToc::getCurrentIndex()
 
 void QToc::goTo(QModelIndex const & index)
 {
-       if (!index.isValid()) {
+       if (!index.isValid() || index.model()!=tocModel()) {
                lyxerr[Debug::GUI]
                        << "QToc::goTo(): QModelIndex is invalid!"
                        << endl;