vo_wayland: fix null dereference

If compositor sends configure event before back_buffer is allocated, it
will cause null dereference.
This commit is contained in:
Jari Vetoniemi 2015-03-22 02:43:12 +02:00 committed by wm4
parent 3a6ade7a84
commit 3f4e154ec6
1 changed files with 1 additions and 1 deletions

View File

@ -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;