From dea738a245855d93bb21c366747f494f6513a299 Mon Sep 17 00:00:00 2001 From: Rostislav Pehlivanov Date: Mon, 1 Aug 2016 21:08:20 +0100 Subject: wayland_common: check for NULL current_output on fs switching Prevents segfaults when a fullscreen switch is issued before fully initializing the VO. Doesn't change anything since the schedule_resize is only there to resize in case the image size switches, which happens long after init. --- video/out/wayland_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video') diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index dbf614e516..d4b7a1eecc 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -974,8 +974,9 @@ static void vo_wayland_fullscreen(struct vo *vo) wl->window.is_fullscreen = true; wl->window.p_width = wl->window.width; wl->window.p_height = wl->window.height; - schedule_resize(wl, 0, wl->display.current_output->width, - wl->display.current_output->height); + if (wl->display.current_output) + schedule_resize(wl, 0, wl->display.current_output->width, + wl->display.current_output->height); wl_shell_surface_set_fullscreen(wl->window.shell_surface, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, fs_output); -- cgit v1.2.3