Commit df06dc65 authored by Debarshi Ray's avatar Debarshi Ray

GApplication: Don't call dbus_unregister multiple times

https://bugzilla.gnome.org/show_bug.cgi?id=725950
parent b92e15c7
......@@ -120,6 +120,7 @@ struct _GApplicationImpl
gboolean properties_live;
gboolean primary;
gboolean busy;
gboolean registered;
GApplication *app;
};
......@@ -403,6 +404,7 @@ g_application_impl_attempt_primary (GApplicationImpl *impl,
if (impl->actions_id == 0)
return FALSE;
impl->registered = TRUE;
if (!app_class->dbus_register (impl->app,
impl->session_bus,
impl->object_path,
......@@ -455,9 +457,13 @@ g_application_impl_stop_primary (GApplicationImpl *impl)
{
GApplicationClass *app_class = G_APPLICATION_GET_CLASS (impl->app);
app_class->dbus_unregister (impl->app,
impl->session_bus,
impl->object_path);
if (impl->registered)
{
app_class->dbus_unregister (impl->app,
impl->session_bus,
impl->object_path);
impl->registered = FALSE;
}
if (impl->object_id)
{
......
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