GApplication: destroy the impl on shutdown

It's theoretically possible (and see in the wild) for D-Bus messages to
come in to the application after shutdown() has been called and while
we're draining out the lingering events in the main context.

Prevent this from happening by ensuring we unregister our objects on
D-Bus during the shutdown process.

https://bugzilla.gnome.org/show_bug.cgi?id=757372
This commit is contained in:
Allison Ryan Lortie 2015-10-30 15:39:23 +00:00 committed by Matthias Clasen
parent aa16359986
commit 21b1c390a3

View File

@ -2339,7 +2339,11 @@ g_application_run (GApplication *application,
}
if (application->priv->impl)
g_application_impl_flush (application->priv->impl);
{
g_application_impl_flush (application->priv->impl);
g_application_impl_destroy (application->priv->impl);
application->priv->impl = NULL;
}
g_settings_sync ();