From: Richard Heck Date: Mon, 8 Mar 2010 12:42:18 +0000 (+0000) Subject: Make sure the model exists before we access it. X-Git-Tag: 2.0.0~3871 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=60034997d95feafac86b6e865b98883e394d8da0;p=features.git Make sure the model exists before we access it. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33668 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index 5cf82a9c34..738e474b15 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -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,