From 9e3dd6b5600ac3304d33d053714530ac066237db Mon Sep 17 00:00:00 2001 From: emersion Date: Sat, 19 May 2018 09:34:16 +0100 Subject: [PATCH] backend/wayland: fix segfault when destroying backend before starting it --- backend/wayland/backend.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index dc50cf233..4e4ca0770 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -87,7 +87,9 @@ static void backend_destroy(struct wlr_backend *wlr_backend) { free(backend->seat_name); - wl_event_source_remove(backend->remote_display_src); + if (backend->remote_display_src) { + wl_event_source_remove(backend->remote_display_src); + } wlr_renderer_destroy(backend->renderer); wlr_egl_finish(&backend->egl); if (backend->pointer) {