Merge branch 'wip/dont-leak-egl-surface-10' into 'gtk-4-10'

[10] gdk/surface: Don't leak the EGLSurface

See merge request GNOME/gtk!7574
This commit is contained in:
Matthias Clasen 2024-08-07 16:26:03 +00:00
commit 8fac19ab52

View File

@ -1081,8 +1081,10 @@ gdk_surface_set_egl_native_window (GdkSurface *self,
if (priv->egl_surface != NULL)
{
GdkDisplay *display = gdk_surface_get_display (self);
gdk_gl_context_clear_current_if_surface (self);
eglDestroySurface (gdk_surface_get_display (self), priv->egl_surface);
eglDestroySurface (gdk_display_get_egl_display (display), priv->egl_surface);
priv->egl_surface = NULL;
}