diff options
-rw-r--r-- | video/out/opengl/context_wayland.c | 3 |
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); |