mirror of https://github.com/mpv-player/mpv
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:
parent
3a6ade7a84
commit
3f4e154ec6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue