[libadwaita/wip/exalm/new-glib: 16/16] tab-box: Use g_clear_list()




commit be25987161c3654d913b1accf7dd443c1781abba
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Nov 3 00:53:36 2021 +0500

    tab-box: Use g_clear_list()

 src/adw-tab-box.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/src/adw-tab-box.c b/src/adw-tab-box.c
index 596a051a..c35053f2 100644
--- a/src/adw-tab-box.c
+++ b/src/adw-tab-box.c
@@ -3494,9 +3494,7 @@ adw_tab_box_set_view (AdwTabBox  *self,
       self->view_drop_target = NULL;
     }
 
-    g_list_free_full (self->tabs, (GDestroyNotify) remove_and_free_tab_info);
-
-    self->tabs = NULL;
+    g_clear_list (&self->tabs, (GDestroyNotify) remove_and_free_tab_info);
     self->n_tabs = 0;
   }
 


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