[gnome-software/wip/rancell/apt] Unsubscribe from signals on failed authentication, was causing crashes



commit c136972854534a71267e106c9c7454ca33f0868e
Author: Robert Ancell <robert ancell canonical com>
Date:   Thu Mar 17 17:00:58 2016 +1300

    Unsubscribe from signals on failed authentication, was causing crashes

 src/plugins/gs-plugin-apt.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.c b/src/plugins/gs-plugin-apt.c
index 0ea47ed..043f02c 100644
--- a/src/plugins/gs-plugin-apt.c
+++ b/src/plugins/gs-plugin-apt.c
@@ -688,12 +688,12 @@ aptd_transaction (GsPlugin *plugin, const gchar *method, GsApp *app, GError **er
                                              -1,
                                              NULL,
                                              error);
-       if (result == NULL)
-               return FALSE;
-
-       g_main_loop_run (loop);
+       if (result != NULL)
+               g_main_loop_run (loop);
        g_dbus_connection_signal_unsubscribe (conn, property_signal);
        g_dbus_connection_signal_unsubscribe (conn, finished_signal);
+       if (result == NULL)
+               return FALSE;
 
        if (g_strcmp0 (transaction_result, "exit-success") != 0) {
                g_set_error (error,


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