From 3f4e154ec659b1f0aa306f179e8d37eea5fe19cc Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Sun, 22 Mar 2015 02:43:12 +0200 Subject: vo_wayland: fix null dereference If compositor sends configure event before back_buffer is allocated, it will cause null dereference. --- video/out/vo_wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video') diff --git a/video/out/vo_wayland.c b/video/out/vo_wayland.c index ab4ed8c9c3..40f06aa7eb 100644 --- a/video/out/vo_wayland.c +++ b/video/out/vo_wayland.c @@ -268,7 +268,7 @@ static bool resize(struct priv *p) { struct vo_wayland_state *wl = p->wl; - if (SHM_BUFFER_IS_BUSY(p->video_bufpool.back_buffer)) + if (!p->video_bufpool.back_buffer || SHM_BUFFER_IS_BUSY(p->video_bufpool.back_buffer)) return false; // skip resizing if we can't garantuee pixel perfectness! int32_t x = wl->window.sh_x; -- cgit v1.2.3