From c7a0329a871a487ac59ea06bb004e1dbfa077226 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 8 Mar 2008 00:08:03 +0000 Subject: [PATCH] Fix crash. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23549 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/InsetText.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp index 95cc549d55..172255bc69 100644 --- a/src/insets/InsetText.cpp +++ b/src/insets/InsetText.cpp @@ -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());