From: Tommaso Cucinotta Date: Tue, 18 Oct 2011 22:04:42 +0000 (+0000) Subject: Fixing ASSERT on re-opening of Advanced F&R with cursor on a text style non-existing... X-Git-Tag: 2.1.0beta1~2570 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ec0fce7d4497122d4bb6cfdda91df65e5e21627a;p=lyx.git Fixing ASSERT on re-opening of Advanced F&R with cursor on a text style non-existing in the currently opened document. Addressing #7812. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39886 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt4/LayoutBox.cpp b/src/frontends/qt4/LayoutBox.cpp index c46ce45538..df4b076a27 100644 --- a/src/frontends/qt4/LayoutBox.cpp +++ b/src/frontends/qt4/LayoutBox.cpp @@ -534,6 +534,9 @@ void LayoutBox::set(docstring const & layout) if (!d->text_class_) return; + if (!(*d->text_class_).hasLayout(layout)) + return; + Layout const & lay = (*d->text_class_)[layout]; QString newLayout = toqstr(lay.name());