Skip to content

wayland/surface: Only call destroy func when available

When calling gdk_wayland_surface_export_handle(), if we pass some 'user_data' but no 'destroy_func', GTK4 crashes. That's because in xdg_exported_handle() we are unconditionally calling destroy_func -- even when it's NULL.

Fix that by checking if there's a destroy function before calling it.

Fixes #2179 (closed)

Merge request reports