mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 14:00:09 +00:00
macos: ensure element is part of queue
We don't want to risk decrementing length field unless this is actually part of the queue.
This commit is contained in:
parent
e317b9be00
commit
92f0216605
@ -477,7 +477,8 @@ _gdk_macos_display_surface_removed (GdkMacosDisplay *self,
|
||||
if (self->keyboard_surface == surface)
|
||||
_gdk_macos_display_surface_resigned_key (self, surface);
|
||||
|
||||
g_queue_unlink (&self->sorted_surfaces, &surface->sorted);
|
||||
if (queue_contains (&self->sorted_surfaces, &surface->sorted))
|
||||
g_queue_unlink (&self->sorted_surfaces, &surface->sorted);
|
||||
|
||||
if (queue_contains (&self->main_surfaces, &surface->main))
|
||||
_gdk_macos_display_surface_resigned_main (self, surface);
|
||||
|
Loading…
Reference in New Issue
Block a user