backend-wayland: fix error path in wayland_backend_create
Destroy the renderer before disconnecting the Wayland display. Trying to destroy the GL renderer with the Wayland display already gone crashes in the Mesa Wayland integration. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
parent
da683dad57
commit
47180ad253
@ -2938,7 +2938,7 @@ wayland_backend_create(struct weston_compositor *compositor,
|
||||
wl_event_loop_add_fd(loop, fd, WL_EVENT_READABLE,
|
||||
wayland_backend_handle_event, b);
|
||||
if (b->parent.wl_source == NULL)
|
||||
goto err_display;
|
||||
goto err_renderer;
|
||||
|
||||
wl_event_source_check(b->parent.wl_source);
|
||||
|
||||
@ -2949,6 +2949,8 @@ wayland_backend_create(struct weston_compositor *compositor,
|
||||
}
|
||||
|
||||
return b;
|
||||
err_renderer:
|
||||
compositor->renderer->destroy(compositor);
|
||||
err_display:
|
||||
wl_display_disconnect(b->parent.wl_display);
|
||||
err_compositor:
|
||||
|
Loading…
Reference in New Issue
Block a user