Skip to content

Commit

Permalink
Avoid restoring the context being destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Jul 1, 2024
1 parent 6564219 commit bb4bca6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/platforms/wayland/wl_egl_display_provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ class mgw::WlDisplayAllocator::Framebuffer::EGLState

~EGLState()
{
CacheEglState stash;

eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (ctx == eglGetCurrentContext())
{
eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
}
eglDestroyContext(dpy, ctx);
}

Expand Down

0 comments on commit bb4bca6

Please sign in to comment.