diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-09-25 19:52:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 19:52:03 -0400 |
commit | 80a1cc01e9e13badd1596427a5a6d69ef53ab56c (patch) | |
tree | 9e52a0b0c4eb7e115ecd4939459b9967f1da44fd /render | |
parent | 2330a6864373206a1359ec88bad2a8a714205e71 (diff) | |
parent | 00f1686ce5b20fc2000ff577329f804f2a7b596a (diff) |
Merge pull request #161 from acrisci/bug/egl-segfault
unset egl current before terminating display
Diffstat (limited to 'render')
-rw-r--r-- | render/egl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render/egl.c b/render/egl.c index 2db8d4c0..048626ba 100644 --- a/render/egl.c +++ b/render/egl.c @@ -175,13 +175,14 @@ bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, return true; error: + eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglTerminate(egl->display); eglReleaseThread(); - eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); return false; } 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) { egl->eglUnbindWaylandDisplayWL(egl->display, egl->wl_display); } @@ -189,7 +190,6 @@ void wlr_egl_free(struct wlr_egl *egl) { eglDestroyContext(egl->display, egl->context); eglTerminate(egl->display); 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) { |