mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
rootston: roots_keyboard null check
This commit is contained in:
parent
d6513cef5d
commit
1472dbda74
2 changed files with 9 additions and 0 deletions
|
|
@ -249,6 +249,10 @@ struct roots_keyboard *roots_keyboard_create(struct wlr_input_device *device,
|
|||
keyboard->input = input;
|
||||
|
||||
struct keyboard_config *config = calloc(1, sizeof(struct keyboard_config));
|
||||
if (config == NULL) {
|
||||
free(keyboard);
|
||||
return NULL;
|
||||
}
|
||||
keyboard_config_merge(config, config_get_keyboard(input->config, device));
|
||||
keyboard_config_merge(config, config_get_keyboard(input->config, NULL));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue