]> git.lyx.org Git - features.git/commitdiff
Make sure the model exists before we access it.
authorRichard Heck <rgheck@comcast.net>
Mon, 8 Mar 2010 12:42:18 +0000 (12:42 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 8 Mar 2010 12:42:18 +0000 (12:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33668 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/TocWidget.cpp

index 5cf82a9c3453801a84cc3817d22ef83c25119615..738e474b157b89b9b6cb7d6605b93c67220684f1 100644 (file)
@@ -440,6 +440,9 @@ void TocWidget::updateView()
 
 void TocWidget::filterContents()
 {
+       if (!tocTV->model())
+               return;
+
        QModelIndexList indices = tocTV->model()->match(
                tocTV->model()->index(0, 0),
                Qt::DisplayRole, "*", -1,