X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTrans.cpp;h=e2ba1abb5800c1a8ddb8e71f431f400a716dc964;hb=9926927fb1a38f15ec4fa1334075720925a3295e;hp=9249e8e8d4e00acb814e07c4b038ae309f672f06;hpb=8a047a411235fcf5ba48f075e0a23a7cf1e3e8bb;p=lyx.git diff --git a/src/Trans.cpp b/src/Trans.cpp index 9249e8e8d4..e2ba1abb58 100644 --- a/src/Trans.cpp +++ b/src/Trans.cpp @@ -280,10 +280,14 @@ 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));