mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 02:09:52 +00:00
wayland_common: init output_list during main struct init
Otherwise if display connection or xkb init failed the uninit function could segfault.
This commit is contained in:
parent
b4c1f0aae3
commit
c052849e52
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user