summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgnacio Casal Quinteiro <qignacio@amazon.com>2021-01-08 13:11:56 +0100
committerIgnacio Casal Quinteiro <qignacio@amazon.com>2021-01-08 13:11:56 +0100
commita720d8bc79bf2ec67108506204a7995a78306fdb (patch)
tree79d219c24b26d49c0ea1370c8ddbf26d2d64cab6
parent57691eacc5a10bf9cf62797f1452ffa16f04051c (diff)
downloadgtk+-a720d8bc79bf2ec67108506204a7995a78306fdb.tar.gz
seatdefault: use g_clear_pointer to unref the toolsnacho/seatdefault
-rw-r--r--gdk/gdkseatdefault.c6
1 files changed, 1 insertions, 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);