monitor-manager: Use g_clear_handle() to clean up D-Bus name owning

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2901>
This commit is contained in:
Jonas Ådahl 2023-03-06 23:49:39 +01:00 committed by Marge Bot
parent e6a53ef113
commit dbe8141a67

View File

@ -1357,11 +1357,7 @@ meta_monitor_manager_dispose (GObject *object)
{
MetaMonitorManager *manager = META_MONITOR_MANAGER (object);
if (manager->dbus_name_id != 0)
{
g_bus_unown_name (manager->dbus_name_id);
manager->dbus_name_id = 0;
}
g_clear_handle_id (&manager->dbus_name_id, g_bus_unown_name);
g_clear_object (&manager->display_config);
g_clear_object (&manager->config_manager);