summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hergert <christian@hergert.me>2015-09-30 18:34:16 -0700
committerChristian Hergert <christian@hergert.me>2015-09-30 18:34:16 -0700
commitabe99e4611ac38ad66e28ca8fef3f41ad7e24e8c (patch)
tree9da3e120aae6b2e0c2ad1e4de00e16200822c2d8
parentf7b7c33cc942625cbbdc797f9d87bdaca3c1274e (diff)
downloadgtk+-abe99e4611ac38ad66e28ca8fef3f41ad7e24e8c.tar.gz
quartz: release linked list as we process it
Rather than performing the list iteration and the list free as separate steps, free the list link while iterating.
-rw-r--r--gdk/quartz/gdkwindow-quartz.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 75ef38534e..2b4b2cc709 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -376,7 +376,6 @@ _gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
void
_gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
{
- GSList *old_update_nswindows = update_nswindows;
GSList *tmp_list = update_nswindows;
update_nswindows = NULL;
@@ -391,11 +390,9 @@ _gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
[nswindow flushWindow];
[nswindow release];
- tmp_list = tmp_list->next;
+ tmp_list = g_slist_remove_link (tmp_list, tmp_list);
}
- g_slist_free (old_update_nswindows);
-
in_process_all_updates = FALSE;
NSEnableScreenUpdates ();