seatdefault: use g_clear_pointer to unref the tools

This commit is contained in:
Ignacio Casal Quinteiro 2021-01-08 13:11:56 +01:00
parent 57691eacc5
commit a720d8bc79

View File

@ -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);