fix crash on buffer-switching (2 tabs) + toc-clicking

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16769 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2007-01-19 22:16:26 +00:00
parent 1b56c1fbeb
commit 2d0838650c

View 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;