[gtk/nacho/seatdefault: 2/2] seatdefault: use g_clear_pointer to unref the tools
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/nacho/seatdefault: 2/2] seatdefault: use g_clear_pointer to unref the tools
- Date: Fri, 8 Jan 2021 12:12:36 +0000 (UTC)
commit a720d8bc79bf2ec67108506204a7995a78306fdb
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Fri Jan 8 13:11:56 2021 +0100
seatdefault: use g_clear_pointer to unref the tools
gdk/gdkseatdefault.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/gdk/gdkseatdefault.c b/gdk/gdkseatdefault.c
index 0a05046cc3..7e2c83ea93 100644
--- a/gdk/gdkseatdefault.c
+++ b/gdk/gdkseatdefault.c
@@ -79,11 +79,7 @@ gdk_seat_default_dispose (GObject *object)
g_object_unref (l->data);
}
- if (priv->tools)
- {
- g_ptr_array_unref (priv->tools);
- priv->tools = NULL;
- }
+ g_clear_pointer (&priv->tools, g_ptr_array_unref);
g_list_free (priv->physical_pointers);
g_list_free (priv->physical_keyboards);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]