diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2019-08-15 14:02:22 +0200 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2019-08-15 14:03:48 +0200 |
commit | 45f5e536ecc4a2b3d51434eeae698ab2ab7df697 (patch) | |
tree | 8f88e7475227ee4e1b750c25c8e4b209f74c69af | |
parent | 324d846567abcdf79f94e8964161c4fda2498567 (diff) | |
download | weston-45f5e536ecc4a2b3d51434eeae698ab2ab7df697.tar.gz |
Fix a crash when closing an X11 window with a selection
This was caused by weston_wm_handle_xfixes_selection_notify() calling
weston_seat_set_selection() with a NULL source, apparently only
sometimes when closing an Xwayland window.
-rw-r--r-- | libweston/data-device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libweston/data-device.c b/libweston/data-device.c index e19409fc..865d7497 100644 --- a/libweston/data-device.c +++ b/libweston/data-device.c @@ -1152,7 +1152,9 @@ weston_seat_set_selection(struct weston_seat *seat, seat->selection_data_source = source; seat->selection_serial = serial; - source->set_selection = true; + + if (source) + source->set_selection = true; if (keyboard) focus = keyboard->focus; |