[gnome-software/wip/rancell/ubuntu-3-20-rebase: 32/33] update monitor: Fix a possible crash when download-updates setting is changed
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/ubuntu-3-20-rebase: 32/33] update monitor: Fix a possible crash when download-updates setting is changed
- Date: Sat, 17 Jun 2017 09:51:02 +0000 (UTC)
commit e5666018797cda1dff581e6a2bd6c8e4292b53e2
Author: Kalev Lember <klember redhat com>
Date: Tue Jul 5 12:36:59 2016 +0200
update monitor: Fix a possible crash when download-updates setting is changed
Make sure to disconnect the updates-changed signal handler so that we
don't get the callback after the update monitor has been destroyed.
May fix https://bugzilla.redhat.com/show_bug.cgi?id=1320307
src/gs-update-monitor.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-update-monitor.c b/src/gs-update-monitor.c
index 43b7ca0..b321784 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -706,6 +706,12 @@ gs_update_monitor_dispose (GObject *object)
monitor);
monitor->network_monitor = NULL;
}
+ if (monitor->plugin_loader != NULL) {
+ g_signal_handlers_disconnect_by_func (monitor->plugin_loader,
+ updates_changed_cb,
+ monitor);
+ monitor->plugin_loader = NULL;
+ }
g_clear_object (&monitor->settings);
G_OBJECT_CLASS (gs_update_monitor_parent_class)->dispose (object);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]