finch/gntaccount.c

changeset 42172
7c2d151b410d
parent 42079
679258d92a92
child 42234
95aec1611d01
--- a/finch/gntaccount.c	Mon Mar 20 23:06:42 2023 -0500
+++ b/finch/gntaccount.c	Tue Mar 21 00:39:45 2023 -0500
@@ -380,11 +380,7 @@
 		gnt_box_set_fill(GNT_BOX(vbox), TRUE);
 	}
 
-	if (dialog->protocol_entries)
-	{
-		g_list_free(dialog->protocol_entries);
-		dialog->protocol_entries = NULL;
-	}
+	g_clear_list(&dialog->protocol_entries, NULL);
 
 	vbox = dialog->protocols;
 
@@ -949,8 +945,6 @@
 }
 
 void
-finch_accounts_uninit(void)
-{
-	if (accounts.window)
-		gnt_widget_destroy(accounts.window);
+finch_accounts_uninit(void) {
+	g_clear_pointer(&accounts.window, gnt_widget_destroy);
 }

mercurial