Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
sagudev committed Feb 11, 2025
1 parent 8411832 commit 1067eb4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/platform/generic/egl/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ impl EGLBackedContext {

pub(crate) unsafe fn destroy(&mut self, egl_display: EGLDisplay) {
EGL_FUNCTIONS.with(|egl| {
let result = egl.DestroySurface(self.egl_display, context.pbuffer);
assert_ne!(result, egl::FALSE);
context.pbuffer = egl::NO_SURFACE;
if self.pbuffer.read != egl::NO_SURFACE {
let result = egl.DestroySurface(egl_display, self.pbuffer.read);
assert_ne!(result, egl::FALSE);
self.pbuffer = ExternalEGLSurfaces::default();
}

egl.MakeCurrent(
egl_display,
Expand Down

0 comments on commit 1067eb4

Please sign in to comment.