mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
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:
parent
022a719d0d
commit
2d85046fd7
@ -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);
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ void InsetNoteParams::read(LyXLex & lex)
|
||||
{
|
||||
string label;
|
||||
lex >> label;
|
||||
if (lex)
|
||||
if (lex.isOK())
|
||||
type = notetranslator().find(label);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user