guard null context in applyConfigToKeyboard

This commit is contained in:
vaxerski 2022-06-23 18:52:05 +02:00
parent 4945c5887d
commit b25bafda08

View file

@ -296,6 +296,12 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) {
.options = OPTIONS.c_str()}; .options = OPTIONS.c_str()};
const auto CONTEXT = xkb_context_new(XKB_CONTEXT_NO_FLAGS); const auto CONTEXT = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!CONTEXT) {
Debug::log(ERR, "applyConfigToKeyboard: CONTEXT null??");
return;
}
const auto KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS); const auto KEYMAP = xkb_keymap_new_from_names(CONTEXT, &rules, XKB_KEYMAP_COMPILE_NO_FLAGS);
if (!KEYMAP) { if (!KEYMAP) {