summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2019-08-15 14:02:22 +0200
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2019-08-15 14:03:48 +0200
commit45f5e536ecc4a2b3d51434eeae698ab2ab7df697 (patch)
tree8f88e7475227ee4e1b750c25c8e4b209f74c69af
parent324d846567abcdf79f94e8964161c4fda2498567 (diff)
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.c4
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;