mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Fix use-after-free in gdk_window_end_paint()
It's a miracle that this code ever worked.
This commit is contained in:
parent
7b9e9027e7
commit
1432d23e98
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user