From: Richard Heck Date: Thu, 19 Feb 2009 04:18:31 +0000 (+0000) Subject: Fix bug 5751. X-Git-Tag: 2.0.0~7188 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e2d20d4386189e3b64ba795ce3e942193da43fdb;p=features.git Fix bug 5751. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28554 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index e1d9a09928..c773bf80e1 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -369,7 +369,13 @@ void InsetNote::string2params(string const & in, InsetNoteParams & params) Lexer lex; lex.setStream(data); lex.setContext("InsetNote::string2params"); - lex >> "note" >> "Note"; + lex >> "note"; + // There are cases, such as when we are called via getStatus() from + // Dialog::canApply(), where we are just called with "note" rather + // than a full "note Note TYPE". + if (!lex.isOK()) + return; + lex >> "Note"; params.read(lex); }