Commit 4b72ff0e authored by Derek Foreman's avatar Derek Foreman

xwayland: Fix crash on weston shutdown

commit e7fff215 made initializing the
selection_listener conditional, but didn't make its clean-up
conditional at shutdown.  Simply initializing the listener's list
link at init time makes this harmless.

To see this, run weston -Bheadless-backend.so and then connect to it
with an X client.  When killing weston it will attempt shutdown but
die with a segfault.
Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
parent f85bf152
......@@ -681,6 +681,8 @@ weston_wm_selection_init(struct weston_wm *wm)
struct weston_seat *seat;
uint32_t values[1], mask;
wl_list_init(&wm->selection_listener.link);
wm->selection_request.requestor = XCB_NONE;
values[0] = XCB_EVENT_MASK_PROPERTY_CHANGE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment