X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTrans.cpp;h=e2ba1abb5800c1a8ddb8e71f431f400a716dc964;hb=8f6491f073af4a4f29faac91e21900ce81d74300;hp=ed73c7719b397699db193c51efc127059df18577;hpb=9d49f09bcf1061103c3dfafaac245bb45de9dcf2;p=lyx.git diff --git a/src/Trans.cpp b/src/Trans.cpp index ed73c7719b..e2ba1abb58 100644 --- a/src/Trans.cpp +++ b/src/Trans.cpp @@ -280,17 +280,17 @@ int Trans::load(Lexer & lex) && it->second[1] == accent_2) break; } + + // could not find accent2 on a key -- this should not happen. + if (it == end) + return -1; + docstring allowed; if (!lex.next()) return -1; - allowed = lex.getDocString(); LYXERR(Debug::KBMAP, "allowed: " << to_utf8(allowed)); - // FIXME Coverity - // This is being flagged because we could in principle fail - // ever to hit the break above, in which case we exit the loop - // when it == end. Then this crashes. insertException(kmod_list_[accent_1].exception_list, it->first, allowed, true, accent_2); }