diff options
author | 2016-12-15 18:03:59 -0500 | |
---|---|---|
committer | 2016-12-15 19:01:41 -0500 | |
commit | 8cef81d6f23adb66873ee5fd84aa7180b22624f2 (patch) | |
tree | 0739dff1b879b5a674dbd56e44ad4f4a44e941c7 /sway/commands.c | |
parent | Handle config-related allocation failures (diff) | |
download | sway-8cef81d6f23adb66873ee5fd84aa7180b22624f2.tar.gz sway-8cef81d6f23adb66873ee5fd84aa7180b22624f2.tar.zst sway-8cef81d6f23adb66873ee5fd84aa7180b22624f2.zip |
Handle some more memory allocation failures
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index dee03d71..8d199467 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -121,6 +121,9 @@ void input_cmd_apply(struct input_config *input) { | |||
121 | for (int i = 0; i < input_devices->length; ++i) { | 121 | for (int i = 0; i < input_devices->length; ++i) { |
122 | device = input_devices->items[i]; | 122 | device = input_devices->items[i]; |
123 | char* dev_identifier = libinput_dev_unique_id(device); | 123 | char* dev_identifier = libinput_dev_unique_id(device); |
124 | if (!dev_identifier) { | ||
125 | break; | ||
126 | } | ||
124 | int match = dev_identifier && strcmp(dev_identifier, input->identifier) == 0; | 127 | int match = dev_identifier && strcmp(dev_identifier, input->identifier) == 0; |
125 | free(dev_identifier); | 128 | free(dev_identifier); |
126 | if (match) { | 129 | if (match) { |