From f84733f791c7c2e99608f353c7a4c4cf0e5d2841 Mon Sep 17 00:00:00 2001 From: Bilal Elmoussaoui Date: Mon, 9 Oct 2023 11:09:58 +0200 Subject: [PATCH] meta/stage: Check if the swap region is not empty before transforming it As cairo_region_create_rectangles would return NULL if n_rects=0 but the upcoming commits which port to MtkRegion disallows that Part-of: --- src/backends/meta-stage-impl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/meta-stage-impl.c b/src/backends/meta-stage-impl.c index eb40e1707..6872abfef 100644 --- a/src/backends/meta-stage-impl.c +++ b/src/backends/meta-stage-impl.c @@ -701,7 +701,8 @@ meta_stage_impl_redraw_view_primary (MetaStageImpl *stage_impl, } if (clutter_stage_view_get_onscreen (stage_view) != - clutter_stage_view_get_framebuffer (stage_view)) + clutter_stage_view_get_framebuffer (stage_view) && + cairo_region_num_rectangles (swap_region) != 0) { cairo_region_t *transformed_swap_region;