summaryrefslogtreecommitdiffstats
path: root/video/out/opengl/context_wayland.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-03-03 15:30:28 +0100
committerwm4 <wm4@nowhere>2016-03-03 15:30:28 +0100
commit5c2026336419805202fbf7a817b2960b0584ce5d (patch)
tree1ead4cfe36e214154109013f4ed6fb3323e4d17a /video/out/opengl/context_wayland.c
parenta4e29e67f91a24cb18443f7b21e74401781161f4 (diff)
downloadmpv-5c2026336419805202fbf7a817b2960b0584ce5d.tar.bz2
mpv-5c2026336419805202fbf7a817b2960b0584ce5d.tar.xz
vo_opengl: wayland: don't destroy NULL wl_egl_window
The wayland client API crashes intentionally when trying to free NULL objects. (Thanks.)
Diffstat (limited to 'video/out/opengl/context_wayland.c')
-rw-r--r--video/out/opengl/context_wayland.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index 63a14539fe..a100073780 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -183,7 +183,8 @@ static void waylandgl_uninit(MPGLContext *ctx)
if (wl->egl_context.egl.ctx) {
eglReleaseThread();
- wl_egl_window_destroy(wl->egl_context.egl_window);
+ if (wl->egl_context.egl_window)
+ wl_egl_window_destroy(wl->egl_context.egl_window);
eglDestroySurface(wl->egl_context.egl.dpy, wl->egl_context.egl_surface);
eglMakeCurrent(wl->egl_context.egl.dpy, NULL, NULL, EGL_NO_CONTEXT);
eglDestroyContext(wl->egl_context.egl.dpy, wl->egl_context.egl.ctx);