Commit 4c44243b authored by Dorota Czaplejewicz's avatar Dorota Czaplejewicz
Browse files

Layouts: Fix crash on no layout set

parent 0c36205e
Pipeline #2579 passed with stage
in 48 seconds
......@@ -870,8 +870,9 @@ update_keymap(struct virtual_keyboard *virtual_keyboard)
{
const char *keymap_str = default_keymap_str;
for (unsigned i = 0; i < layouts_count; i++) {
if (strcmp(layouts[i]->language,
virtual_keyboard->preferred_layout) == 0) {
if (virtual_keyboard->preferred_layout
&& strcmp(layouts[i]->language,
virtual_keyboard->preferred_layout) == 0) {
keymap_str = layouts[i]->keymap_str;
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment