clutter/paint-context: Stop copying NULL-regions
Unlike `cairo_region_copy`, `mtk_region_copy()` does not accept NULL
pointers.
Fixes: 655b4a9c75
(Port to MtkRegion)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3361>
This commit is contained in:
parent
4e088cac0e
commit
b17246458a
@ -73,9 +73,11 @@ clutter_paint_context_new_for_framebuffer (CoglFramebuffer *framebuffer,
|
||||
|
||||
paint_context = g_new0 (ClutterPaintContext, 1);
|
||||
g_ref_count_init (&paint_context->ref_count);
|
||||
paint_context->redraw_clip = mtk_region_copy (redraw_clip);
|
||||
paint_context->paint_flags = paint_flags;
|
||||
|
||||
if (redraw_clip)
|
||||
paint_context->redraw_clip = mtk_region_copy (redraw_clip);
|
||||
|
||||
clutter_paint_context_push_framebuffer (paint_context, framebuffer);
|
||||
|
||||
return paint_context;
|
||||
|
Loading…
Reference in New Issue
Block a user