mirror of
https://github.com/mpv-player/mpv
synced 2024-10-02 16:25:33 +02:00
vo_opengl: wayland: don't destroy NULL wl_egl_window
The wayland client API crashes intentionally when trying to free NULL objects. (Thanks.)
This commit is contained in:
parent
a4e29e67f9
commit
5c20263364
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user