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.
This commit is contained in:
Emmanuel Gil Peyrot 2019-08-15 14:02:22 +02:00
parent 324d846567
commit 45f5e536ec

View file

@ -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;