mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
KeyboardPreferenceLoader: Don't crash when "Keymaps" is empty
This commit is contained in:
parent
2b14a11238
commit
85c3852b8f
Notes:
sideshowbarker
2024-07-17 19:51:44 +09:00
Author: https://github.com/Rummskartoffel Commit: https://github.com/SerenityOS/serenity/commit/85c3852b8f1 Pull-request: https://github.com/SerenityOS/serenity/pull/12270
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
|
|||
auto keymaps = mapper_config->read_entry("Mapping", "Keymaps", "");
|
||||
|
||||
auto keymaps_vector = keymaps.split(',');
|
||||
if (keymaps_vector.size() == 0)
|
||||
exit(1);
|
||||
|
||||
pid_t child_pid;
|
||||
const char* argv[] = { "/bin/keymap", "-m", keymaps_vector.first().characters(), nullptr };
|
||||
|
|
Loading…
Reference in a new issue