mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 03:09:48 +01:00
guard null context in applyConfigToKeyboard
This commit is contained in:
parent
4945c5887d
commit
b25bafda08
1 changed files with 6 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue