diff options
author | vaxerski <[email protected]> | 2022-06-23 18:52:05 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-06-23 18:52:05 +0200 |
commit | b25bafda0834f58acf50f472bfa0534f5714f30a (patch) | |
tree | 12e97831b6f0734bddd51d73e3f458b9f28fe8c9 /src/managers/input/InputManager.cpp | |
parent | 4945c5887d516fafc84d53e041b2aa901c7c94ee (diff) | |
download | Hyprland-b25bafda0834f58acf50f472bfa0534f5714f30a.tar.gz Hyprland-b25bafda0834f58acf50f472bfa0534f5714f30a.zip |
guard null context in applyConfigToKeyboard
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r-- | src/managers/input/InputManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index fb4b50ef..79a13369 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -296,6 +296,12 @@ void CInputManager::applyConfigToKeyboard(SKeyboard* pKeyboard) { .options = OPTIONS.c_str()}; 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); if (!KEYMAP) { |