[glib] GApplication: destroy the impl on shutdown



commit 21b1c390a3ce1f7e2816c6309f161c4b92470c46
Author: Allison Ryan Lortie <desrt desrt ca>
Date:   Fri Oct 30 15:39:23 2015 +0000

    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

 gio/gapplication.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 551e8ce..ef3074b 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -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 ();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]