[gnome-software] Fix a refcounting error



commit 8031db677e58d0c5977f58380725ce6e1bfd04aa
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 26 17:40:54 2013 -0400

    Fix a refcounting error
    
    g_network_monitor_get_default is transfer-none, so we need
    to take a reference if we want to drop it later on.

 src/gs-application.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-application.c b/src/gs-application.c
index 75e328f..ef54a3c 100644
--- a/src/gs-application.c
+++ b/src/gs-application.c
@@ -82,7 +82,7 @@ network_changed_cb (GNetworkMonitor *monitor,
 static void
 gs_application_monitor_network (GsApplication *app)
 {
-       app->network_monitor = g_network_monitor_get_default ();
+       app->network_monitor = g_object_ref (g_network_monitor_get_default ());
 
        g_signal_connect (app->network_monitor, "network-changed",
                          G_CALLBACK (network_changed_cb), app);


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