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



commit 2a7c5f182f856fc86832345e04866b75282828ab
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]