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:
wm4 2016-03-03 15:30:28 +01:00
parent a4e29e67f9
commit 5c20263364
1 changed files with 2 additions and 1 deletions

View File

@ -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);