gdk: Don't infinite loop when flushing moves

Spotted by Kristian Rietvield. Fixes testoffscreen test.
This commit is contained in:
Benjamin Otte 2010-08-05 02:26:59 +02:00
parent 075661d376
commit c4f280651a

View File

@ -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);
}
/**