mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-24 07:24:31 +08:00
Fix eglDestroySurface() argument order when using EGL with X11
eglDestroySurface takes the display first and the surface second rather
than the other way around. Since both EGLDisplay and EGLSurface are just
typedef'd to void* this doesn't raise a compiler warning. This currently
doesn't crash at runtime because Mesa validates the display pointer
against a list of known good values and fails gracefully, but it still
causes a resource leak.
The wrong call was present since the changes of 23ccdb2 (Improve and
document wxGLCanvas::CreateSurface(), 2023-03-21), see #23366.
Closes #26341.
This commit is contained in:
committed by
Vadim Zeitlin
parent
2d6aaa14d5
commit
a62b291353
+1
-1
@@ -611,7 +611,7 @@ void wxGLCanvasEGL::OnRealized()
|
||||
{
|
||||
if ( m_surface != EGL_NO_SURFACE )
|
||||
{
|
||||
eglDestroySurface(m_surface, m_display);
|
||||
eglDestroySurface(m_display, m_surface);
|
||||
m_surface = EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user