Fix crash after inset-insert ert, from Bernhard Roider

Extend this to some other cases by me.

	* src/insets/insetert.C
	(void InsetERTMailer::string2params): Test for lex.isOK rather than
	lex, since the latter is also true if there was nothing to read.

	* src/insets/insetvspace.C
	(InsetVSpace::read): ditto
	(InsetVSpaceMailer::string2params): ditto

	* src/insets/insetnote.C
	(InsetNoteParams::read): ditto


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17284 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2007-02-20 20:48:23 +00:00
parent 022a719d0d
commit 2d85046fd7
3 changed files with 4 additions and 4 deletions

View File

@ -466,7 +466,7 @@ void InsetERTMailer::string2params(string const & in,
int s;
lex >> s;
if (lex)
if (lex.isOK())
status = static_cast<InsetCollapsable::CollapseStatus>(s);
}

View File

@ -105,7 +105,7 @@ void InsetNoteParams::read(LyXLex & lex)
{
string label;
lex >> label;
if (lex)
if (lex.isOK())
type = notetranslator().find(label);
}

View File

@ -88,7 +88,7 @@ void InsetVSpace::read(Buffer const &, LyXLex & lex)
BOOST_ASSERT(lex.isOK());
string vsp;
lex >> vsp;
if (lex)
if (lex.isOK())
space_ = VSpace(vsp);
string end_token;
@ -257,7 +257,7 @@ void InsetVSpaceMailer::string2params(string const & in, VSpace & vspace)
string vsp;
lex >> vsp;
if (lex)
if (lex.isOK())
vspace = VSpace(vsp);
}