Fix crash.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23549 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-03-08 00:08:03 +00:00
parent ac20e8e694
commit c7a0329a87

View File

@ -140,9 +140,10 @@ void InsetText::setParagraphOwner()
void InsetText::clear()
{
ParagraphList & pars = paragraphs();
BOOST_ASSERT(!pars.empty());
// This is a gross hack...
Layout old_layout = pars.begin()->layout();
Layout const & old_layout = pars.begin()->layout();
pars.clear();
pars.push_back(Paragraph());