[gnome-software] GsApplication: Cancel the cancellable on shutdown



commit 95ae87040e6b921cb353469eb0d1ff765445236d
Author: Kalev Lember <kalevlember gmail com>
Date:   Wed May 14 16:32:01 2014 +0200

    GsApplication: Cancel the cancellable on shutdown
    
    Just dropping the references isn't enough to cancel it.

 src/gs-application.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index a3e3216..c85d654 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -456,8 +456,12 @@ gs_application_finalize (GObject *object)
 {
        GsApplication *app = GS_APPLICATION (object);
 
+       if (app->cancellable != NULL) {
+               g_cancellable_cancel (app->cancellable);
+               g_clear_object (&app->cancellable);
+       }
+
        g_clear_object (&app->plugin_loader);
-       g_clear_object (&app->cancellable);
        g_clear_object (&app->shell);
        g_clear_object (&app->provider);
        g_clear_object (&app->update_monitor);


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