]> git.lyx.org Git - features.git/commitdiff
Fix bug 5751.
authorRichard Heck <rgheck@comcast.net>
Thu, 19 Feb 2009 04:18:31 +0000 (04:18 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 19 Feb 2009 04:18:31 +0000 (04:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28554 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetNote.cpp

index e1d9a09928142ece105380b319106e5a5120d68e..c773bf80e1df42d0b283da6a86bc5ec1cce06e00 100644 (file)
@@ -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);
 }