mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:27:34 +00:00
KeyboardPreferenceLoader: Don't crash when "Keymaps" is empty
This commit is contained in:
parent
2b14a11238
commit
85c3852b8f
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 = mapper_config->read_entry("Mapping", "Keymaps", "");
|
||||||
|
|
||||||
auto keymaps_vector = keymaps.split(',');
|
auto keymaps_vector = keymaps.split(',');
|
||||||
|
if (keymaps_vector.size() == 0)
|
||||||
|
exit(1);
|
||||||
|
|
||||||
pid_t child_pid;
|
pid_t child_pid;
|
||||||
const char* argv[] = { "/bin/keymap", "-m", keymaps_vector.first().characters(), nullptr };
|
const char* argv[] = { "/bin/keymap", "-m", keymaps_vector.first().characters(), nullptr };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue