[mutter] clutter/cogl/stage: Use g_clear_pointer() to clean up regions
- From: Jonas Ådahl <jadahl src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [mutter] clutter/cogl/stage: Use g_clear_pointer() to clean up regions
 
- Date: Tue, 25 Feb 2020 18:40:29 +0000 (UTC)
 
commit b68c6303295d53bc386b71b1de79377328e814e0
Author: Jonas Ådahl <jadahl gmail com>
Date:   Thu Feb 6 10:11:29 2020 +0100
    clutter/cogl/stage: Use g_clear_pointer() to clean up regions
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/1042
 clutter/clutter/cogl/clutter-stage-cogl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
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)
     {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]