Skip to content

fullscreen-shell/fullscreen-shell.c: seat_created(): fix handling for passed wl_listener *l == NULL

In fullscreen shell we get an Segmentation fault on connecting / disconnecting mouse devices.

[10:04:33.601] libinput: configuring device "Logitech USB Laser Mouse".
[10:04:33.601] associating input device event11 with output DP-1 (none by udev)
[10:04:47.741] event11 - [10:04:47.741] Logitech USB Laser Mouse: [10:04:47.741] device removed
Segmentation fault
  • seat_created() gets NULL in l (struct wl_listener *l)
  • the result of container_of(NULL, ...) is 0xffffffffffffffb0, is stored to listener->shell
  • in seat_caps_changed() listener->shell is used

This patch seems to solve this problem.

Merge request reports

Loading