Fix use-after-free in gdk_window_end_paint()

It's a miracle that this code ever worked.
This commit is contained in:
Руслан Ижбулатов 2015-04-30 20:43:18 +00:00
parent 7b9e9027e7
commit 1432d23e98

View File

@ -3111,7 +3111,6 @@ gdk_window_end_paint (GdkWindow *window)
{
surface = gdk_window_ref_impl_surface (window);
cr = cairo_create (surface);
cairo_surface_destroy (surface);
cairo_set_source_surface (cr, window->current_paint.surface, 0, 0);
gdk_cairo_region (cr, window->current_paint.region);
@ -3123,6 +3122,7 @@ gdk_window_end_paint (GdkWindow *window)
cairo_destroy (cr);
cairo_surface_flush (surface);
cairo_surface_destroy (surface);
}
}