[gnome-software] Keep a ref on the plugin loader during an idle



commit cce40aa5de6665f3815173333852260e2dc118c0
Author: Kalev Lember <klember redhat com>
Date:   Fri Jan 29 22:44:16 2016 +0100

    Keep a ref on the plugin loader during an idle
    
    Make sure the plugin_loader stays alive during the idle. Seems like a
    fairly uncommon crash as I suspect it has to hit it during main loop
    shutdown.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1303228

 src/gs-plugin-loader.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 2f9d855..a504be3 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -2797,6 +2797,8 @@ gs_plugin_loader_updates_changed_delay_cb (gpointer user_data)
        g_debug ("updates-changed");
        g_signal_emit (plugin_loader, signals[SIGNAL_UPDATES_CHANGED], 0);
        priv->updates_changed_id = 0;
+
+       g_object_unref (plugin_loader);
        return FALSE;
 }
 
@@ -2813,7 +2815,7 @@ gs_plugin_loader_updates_changed_cb (GsPlugin *plugin, gpointer user_data)
        priv->updates_changed_id =
                g_timeout_add_seconds (GS_PLUGIN_LOADER_UPDATES_CHANGED_DELAY,
                                       gs_plugin_loader_updates_changed_delay_cb,
-                                      plugin_loader);
+                                      g_object_ref (plugin_loader));
 }
 
 /**


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