Commit 984d16e6 authored by Richard Hughes's avatar Richard Hughes Committed by Ray Strode

Fix a critical warning on calling polkit_permission_new_sync with no system bus

parent c3646a22
......@@ -137,10 +137,13 @@ polkit_permission_finalize (GObject *object)
g_free (permission->tmp_authz_id);
g_object_unref (permission->subject);
g_signal_handlers_disconnect_by_func (permission->authority,
on_authority_changed,
permission);
g_object_unref (permission->authority);
if (permission->authority != NULL)
{
g_signal_handlers_disconnect_by_func (permission->authority,
on_authority_changed,
permission);
g_object_unref (permission->authority);
}
if (G_OBJECT_CLASS (polkit_permission_parent_class)->finalize != NULL)
G_OBJECT_CLASS (polkit_permission_parent_class)->finalize (object);
......
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