mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
unset egl current before terminating display
fixes segfault when closing the compositor with an egl window.
This commit is contained in:
parent
2330a68643
commit
00f1686ce5
1 changed files with 2 additions and 2 deletions
|
@ -175,13 +175,14 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform,
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||||
eglTerminate(egl->display);
|
eglTerminate(egl->display);
|
||||||
eglReleaseThread();
|
eglReleaseThread();
|
||||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_egl_free(struct wlr_egl *egl) {
|
void wlr_egl_free(struct wlr_egl *egl) {
|
||||||
|
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||||
if (egl->wl_display && egl->eglUnbindWaylandDisplayWL) {
|
if (egl->wl_display && egl->eglUnbindWaylandDisplayWL) {
|
||||||
egl->eglUnbindWaylandDisplayWL(egl->display, egl->wl_display);
|
egl->eglUnbindWaylandDisplayWL(egl->display, egl->wl_display);
|
||||||
}
|
}
|
||||||
|
@ -189,7 +190,6 @@ void wlr_egl_free(struct wlr_egl *egl) {
|
||||||
eglDestroyContext(egl->display, egl->context);
|
eglDestroyContext(egl->display, egl->context);
|
||||||
eglTerminate(egl->display);
|
eglTerminate(egl->display);
|
||||||
eglReleaseThread();
|
eglReleaseThread();
|
||||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) {
|
bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) {
|
||||||
|
|
Loading…
Reference in a new issue