From c052849e5271e3d0814865f6a365b92a245aa958 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Thu, 12 Oct 2017 23:14:05 +0100 Subject: wayland_common: init output_list during main struct init Otherwise if display connection or xkb init failed the uninit function could segfault. --- video/out/wayland_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index b723f376c0..77f27c5b73 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -977,12 +977,13 @@ int vo_wayland_init(struct vo *vo) .dnd_fd = -1, }; + wl_list_init(&wl->output_list); + if (!wl->display) return false; if (create_input(wl)) return false; - wl_list_init(&wl->output_list); wl->registry = wl_display_get_registry(wl->display); wl_registry_add_listener(wl->registry, ®istry_listener, wl); -- cgit v1.2.3