diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2015-03-22 02:43:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-23 21:53:32 +0100 |
commit | 3f4e154ec659b1f0aa306f179e8d37eea5fe19cc (patch) | |
tree | 9b6e265f3cc6aadf07201c4e2d89471f58bef27f /video/out/vo_wayland.c | |
parent | 3a6ade7a848f5213525430d9049e96e642638fc8 (diff) | |
download | mpv-3f4e154ec659b1f0aa306f179e8d37eea5fe19cc.tar.bz2 mpv-3f4e154ec659b1f0aa306f179e8d37eea5fe19cc.tar.xz |
vo_wayland: fix null dereference
If compositor sends configure event before back_buffer is allocated, it
will cause null dereference.
Diffstat (limited to 'video/out/vo_wayland.c')
-rw-r--r-- | video/out/vo_wayland.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |