pidgin/plugins/gestures/stroke-draw.c

changeset 42172
7c2d151b410d
parent 41086
631e6cba8635
child 42175
4185b4043214
--- a/pidgin/plugins/gestures/stroke-draw.c	Mon Mar 20 23:06:42 2023 -0500
+++ b/pidgin/plugins/gestures/stroke-draw.c	Tue Mar 21 00:39:45 2023 -0500
@@ -319,9 +319,7 @@
 	struct gstroke_metrics *metrics;
 	GHashTable *hash_table = (GHashTable *)g_object_steal_data(G_OBJECT(widget),
 	                                                           GSTROKE_SIGNALS);
-	if (hash_table) {
-		g_hash_table_destroy(hash_table);
-	}
+	g_clear_pointer(&hash_table, g_hash_table_destroy);
 
 	metrics = (struct gstroke_metrics *)g_object_steal_data(G_OBJECT(widget),
 	                                                        GSTROKE_METRICS);

mercurial