We want to remove the event queue from the list of event queues, not the
surface.
Otherwise the freed queue stays in the list and the next time an event
comes in, we access invalid memory.
Fixes thinko introduced in commit
7fafa5133b5.
Luckily, we leak all surfaces, so this problem never occured.
GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
display_wayland->event_queues =
- g_list_remove (display_wayland->event_queues, surface);
+ g_list_remove (display_wayland->event_queues, impl->event_queue);
g_clear_pointer (&impl->event_queue, wl_event_queue_destroy);
}