Merge pull request #994 from agreppin/master

fix server error on exit: eglMakeCurrent Invalid display
This commit is contained in:
emersion 2018-05-23 15:30:11 +01:00 committed by GitHub
commit 0ab37db543
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -198,8 +198,8 @@ void wlr_egl_finish(struct wlr_egl *egl) {
return;
}
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (egl->wl_display && eglUnbindWaylandDisplayWL) {
eglMakeCurrent(egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (egl->wl_display && egl->egl_exts.bind_wayland_display) {
eglUnbindWaylandDisplayWL(egl->display, egl->wl_display);
}