]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetNote.cpp
Fix bug 5751.
[features.git] / 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);
 }