aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/egl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/render/egl.c b/render/egl.c
index 73680d1d..048626ba 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -59,7 +59,7 @@ static bool egl_exts(struct wlr_egl *egl) {
egl->create_platform_window_surface = (PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC)
eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
- if (!egl->get_platform_display) {
+ if (!egl->create_platform_window_surface) {
wlr_log(L_ERROR,
"Failed to load EGL extension 'eglCreatePlatformWindowSurfaceEXT'");
return false;
@@ -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) {