aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-05-19 09:34:16 +0100
committeremersion <contact@emersion.fr>2018-05-19 09:34:16 +0100
commit9e3dd6b5600ac3304d33d053714530ac066237db (patch)
tree65b1e8a0fcfef7c7d5dbadad1f4554713cf90cfe /backend
parent75b10cd62177a40f14f8ca610b13292726bba169 (diff)
backend/wayland: fix segfault when destroying backend before starting it
Diffstat (limited to 'backend')
-rw-r--r--backend/wayland/backend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index dc50cf23..4e4ca077 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) {