diff --git a/clutter/clutter/cogl/clutter-stage-cogl.c b/clutter/clutter/cogl/clutter-stage-cogl.c index ec9e746bc..dcee3d4b8 100644 --- a/clutter/clutter/cogl/clutter-stage-cogl.c +++ b/clutter/clutter/cogl/clutter-stage-cogl.c @@ -1032,10 +1032,8 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window, do_swap_buffer = TRUE; } - if (redraw_clip) - cairo_region_destroy (redraw_clip); - if (fb_clip_region) - cairo_region_destroy (fb_clip_region); + g_clear_pointer (&redraw_clip, cairo_region_destroy); + g_clear_pointer (&fb_clip_region, cairo_region_destroy); if (do_swap_buffer) {