Commit d90e2733 authored by Jan Alexander Steffens's avatar Jan Alexander Steffens Committed by Daniel Boles

GtkApplication: Fix CRITICAL on shutdown when register_session=FALSE

Close GNOME/gtk#1323 (comment 327705)
parent 19bf502f
Pipeline #31888 passed with stages
in 16 minutes and 49 seconds
......@@ -788,15 +788,22 @@ gtk_application_impl_dbus_finalize (GObject *object)
{
GtkApplicationImplDBus *dbus = (GtkApplicationImplDBus *) object;
g_dbus_connection_call (dbus->session,
PORTAL_BUS_NAME,
dbus->session_id,
PORTAL_SESSION_INTERFACE,
"Close",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_free (dbus->session_id);
g_dbus_connection_signal_unsubscribe (dbus->session, dbus->state_changed_handler);
if (dbus->session_id)
{
g_dbus_connection_call (dbus->session,
PORTAL_BUS_NAME,
dbus->session_id,
PORTAL_SESSION_INTERFACE,
"Close",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_free (dbus->session_id);
}
if (dbus->state_changed_handler)
g_dbus_connection_signal_unsubscribe (dbus->session,
dbus->state_changed_handler);
g_clear_object (&dbus->inhibit_proxy);
g_slist_free_full (dbus->inhibit_handles, inhibit_handle_free);
g_free (dbus->app_menu_path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment