fix a rare swapchain leak in PlatformEGL (#9348)

If createSwapChain() fails, a SwapChain object is always returned
(this might itself be a problem, but we can address that later),
however in that case, destroySwapChain() would leak the EGLSwapChain
structure.
This commit is contained in:
Mathias Agopian
2025-10-22 10:25:20 -07:00
committed by GitHub
parent 6caf88d3aa
commit b646700ccc

View File

@@ -618,8 +618,8 @@ void PlatformEGL::destroySwapChain(SwapChain* swapChain) noexcept {
// - this is actually a bit too aggressive, but it is a rare operation.
egl.makeCurrent(mEGLDummySurface, mEGLDummySurface);
eglDestroySurface(mEGLDisplay, sc->sur);
delete sc;
}
delete sc;
}
}