Skip to content
Snippets Groups Projects
Commit f3723d91 authored by Derek Foreman's avatar Derek Foreman Committed by Pekka Paalanen
Browse files

input: don't assume outputs have names


If an output is unnamed and devices are in seats, the strcmp will crash.

Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent e516c3bb
No related branches found
No related tags found
No related merge requests found
......@@ -82,7 +82,8 @@ device_added(struct udev_input *input, struct libinput_device *libinput_device)
if (output_name) {
device->output_name = strdup(output_name);
wl_list_for_each(output, &c->output_list, link)
if (strcmp(output->name, device->output_name) == 0)
if (output->name &&
strcmp(output->name, device->output_name) == 0)
evdev_device_set_output(device, output);
} else if (device->output == NULL && !wl_list_empty(&c->output_list)) {
output = container_of(c->output_list.next,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment