rev 22973: correct fix.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22974 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-02-13 12:37:11 +00:00
parent 7acb8e3998
commit decc411b6b

View File

@ -241,8 +241,11 @@ bool TextClass::read(FileName const & filename, ReadType rt)
lex.setStream(ss);
Layout lay;
lay.setName(emptylayout_);
/*bool error =*/ readStyle(lex, lay);
BOOST_ASSERT(!error);
if (!readStyle(lex, lay)) {
// FIXME: Couldn't we provide some feedback to the user here?
// Use ExceptionMessage maybe?
BOOST_ASSERT(false);
}
layoutlist_.push_back(boost::shared_ptr<Layout>(new Layout(lay)));
}