[gnome-software/wip/temp/ubuntu-xenial-rebased: 163/329] Unsubscribe from signals on failed authentication, was causing crashes



commit f9376c365e0f1bce06b752080fe6fd00d99630b4
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 cddc266..828ef96 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]