]> git.lyx.org Git - features.git/commitdiff
Fix crash by setting Layout before calling InsetText::read().
authorRichard Heck <rgheck@comcast.net>
Wed, 20 Feb 2008 16:56:33 +0000 (16:56 +0000)
committerRichard Heck <rgheck@comcast.net>
Wed, 20 Feb 2008 16:56:33 +0000 (16:56 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23081 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp

index 8e35394b1a1af5d09824d66e22e69167b02047b1..107553fd30fd2e2afdb1f3ae4193978fa73d35b4 100644 (file)
@@ -184,10 +184,11 @@ void InsetCollapsable::read(Buffer const & buf, Lexer & lex)
                        lex.pushToken(token);
                }
        }
-       InsetText::read(buf, lex);
-
+       //this must be set before we enter InsetText::read()
        setLayout(buf.params());
 
+       InsetText::read(buf, lex);
+
        if (!token_found)
                status_ = isOpen() ? Open : Collapsed;