[mutter] texture-tower: Use memory management helpers more



commit 5a58ccbece8ec68f655b53e9717df2a975601925
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Oct 14 21:16:46 2020 +0200

    texture-tower: Use memory management helpers more
    
    https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1496

 src/compositor/meta-texture-tower.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-texture-tower.c b/src/compositor/meta-texture-tower.c
index ab4d61d26f..2571c7e3c0 100644
--- a/src/compositor/meta-texture-tower.c
+++ b/src/compositor/meta-texture-tower.c
@@ -126,12 +126,7 @@ meta_texture_tower_set_base_texture (MetaTextureTower *tower,
     {
       for (i = 1; i < tower->n_levels; i++)
         {
-          if (tower->textures[i] != NULL)
-            {
-              cogl_object_unref (tower->textures[i]);
-              tower->textures[i] = NULL;
-            }
-
+          cogl_clear_object (&tower->textures[i]);
           g_clear_object (&tower->fbos[i]);
         }
 


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