[mutter/wayland] window-actor: Use g_clear_pointer



commit 1a7984be43cc4a3d10f138e41a4d5bec912caee4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Aug 28 11:11:04 2013 -0400

    window-actor: Use g_clear_pointer

 src/compositor/meta-window-actor.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 8e1f55a..55bf0b3 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -2347,11 +2347,7 @@ meta_window_actor_update_shape_region (MetaWindowActor       *self,
   g_clear_pointer (&priv->shape_region, cairo_region_destroy);
   priv->shape_region = region;
 
-  if (priv->shadow_shape != NULL)
-    {
-      meta_window_shape_unref (priv->shadow_shape);
-      priv->shadow_shape = NULL;
-    }
+  g_clear_pointer (&priv->shadow_shape, meta_window_shape_unref);
 
   meta_window_actor_invalidate_shadow (self);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]