mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-17 22:05:25 -05:00
opt: avoid crash when Incorrect Settings for keyboard layout
This commit is contained in:
parent
e658274b71
commit
3ebb9a1508
2 changed files with 28 additions and 6 deletions
|
|
@ -4484,6 +4484,9 @@ bool check_keyboard_rules_validate(struct xkb_rule_names *rules) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!rules->layout || strlen(rules->layout) == 0)
|
||||
return false;
|
||||
|
||||
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||
if (!context) {
|
||||
wlr_log(WLR_ERROR, "Failed to create XKB context for validation");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue