diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 39c1172f92..00ac217963 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -450,10 +450,8 @@ int LyXRC::read(Lexer & lexrc) case RC_KBMAP_PRIMARY: if (lexrc.next()) { string const kmap(os::internal_path(lexrc.getString())); - if (kmap.empty()) { - // nothing - } else if (!libFileSearch("kbd", kmap, - "kmap").empty()) { + if (!libFileSearch("kbd", kmap, "kmap").empty() + || kmap.empty()) { primary_kbmap = kmap; } else { lexrc.printError("LyX: Keymap `$$Token' not found"); @@ -464,10 +462,8 @@ int LyXRC::read(Lexer & lexrc) case RC_KBMAP_SECONDARY: if (lexrc.next()) { string const kmap(os::internal_path(lexrc.getString())); - if (kmap.empty()) { - // nothing - } else if (!libFileSearch("kbd", kmap, - "kmap").empty()) { + if (!libFileSearch("kbd", kmap, "kmap").empty() + || kmap.empty()) { secondary_kbmap = kmap; } else { lexrc.printError("LyX: Keymap `$$Token' not found");