[gnome-software/wip/rancell/ubuntu-3-20-3: 54/55] 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-3: 54/55] update monitor: Fix a possible crash when download-updates setting is changed
- Date: Sun, 18 Jun 2017 01:13:36 +0000 (UTC)
commit 30599a02331fe44dd9036eee4ab0fd368ab0eda3
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 b1a515e..6a23153 100644
--- a/src/gs-update-monitor.c
+++ b/src/gs-update-monitor.c
@@ -608,6 +608,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]