[gnome-software/gnome-3-14] sources dialog: Disconnect from "updates-changed" signal handler
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-14] sources dialog: Disconnect from "updates-changed" signal handler
- Date: Thu, 18 Jun 2015 13:59:19 +0000 (UTC)
commit bcd0130136deaf7b571b761e32abb06573f76a56
Author: Kalev Lember <kalevlember gmail com>
Date: Fri May 29 23:16:00 2015 +0200
sources dialog: Disconnect from "updates-changed" signal handler
Disconnect from the signal handler in dispose to make sure we don't get
callbacks after the dialog is destroyed.
src/gs-sources-dialog.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-sources-dialog.c b/src/gs-sources-dialog.c
index c67fbc8..7e6255b 100644
--- a/src/gs-sources-dialog.c
+++ b/src/gs-sources-dialog.c
@@ -370,7 +370,10 @@ gs_sources_dialog_dispose (GObject *object)
GsSourcesDialog *dialog = GS_SOURCES_DIALOG (object);
GsSourcesDialogPrivate *priv = gs_sources_dialog_get_instance_private (dialog);
- g_clear_object (&priv->plugin_loader);
+ if (priv->plugin_loader != NULL) {
+ g_signal_handlers_disconnect_by_func (priv->plugin_loader, updates_changed_cb, dialog);
+ g_clear_object (&priv->plugin_loader);
+ }
if (priv->cancellable != NULL) {
g_cancellable_cancel (priv->cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]