diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 81f3ab331b..5797591b38 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -3409,14 +3409,16 @@ gdk_window_flush_outstanding_moves (GdkWindow *window) { GdkWindowObject *private; GdkWindowObject *impl_window; - GList *l; + GList *l, *outstanding; GdkWindowRegionMove *move; private = (GdkWindowObject *) window; impl_window = gdk_window_get_impl_window (private); + outstanding = impl_window->outstanding_moves; + impl_window->outstanding_moves = NULL; - for (l = impl_window->outstanding_moves; l != NULL; l = l->next) + for (l = outstanding; l != NULL; l = l->next) { move = l->data; @@ -3426,8 +3428,7 @@ gdk_window_flush_outstanding_moves (GdkWindow *window) gdk_window_region_move_free (move); } - g_list_free (impl_window->outstanding_moves); - impl_window->outstanding_moves = NULL; + g_list_free (outstanding); } /**