[gnome-control-center] region: Avoid a crash on panel destruction
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] region: Avoid a crash on panel destruction
- Date: Tue, 30 Aug 2016 15:18:23 +0000 (UTC)
commit bbdcaaa039b2ec747d307293715900de1cbe88a6
Author: Rui Matos <tiagomatos gmail com>
Date: Mon Aug 29 19:29:05 2016 +0200
region: Avoid a crash on panel destruction
GtkListBox might emit the row-selected signal while being destroyed
and our row-selected handler accesses widgets owned by GtkBuilder so,
depending on the order on which the builder destroys its objects, we
could crash on the signal handler when destroying the builder.
Using g_signal_connect_object() avoids this issue by disconnecting us
before our finalize() runs.
https://bugzilla.gnome.org/show_bug.cgi?id=770563
panels/region/cc-region-panel.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/panels/region/cc-region-panel.c b/panels/region/cc-region-panel.c
index f6ea784..2e054c2 100644
--- a/panels/region/cc-region-panel.c
+++ b/panels/region/cc-region-panel.c
@@ -1482,8 +1482,8 @@ setup_input_section (CcRegionPanel *self)
gtk_list_box_set_header_func (GTK_LIST_BOX (priv->input_list),
cc_list_box_update_header_func,
NULL, NULL);
- g_signal_connect_swapped (priv->input_list, "row-selected",
- G_CALLBACK (update_buttons), self);
+ g_signal_connect_object (priv->input_list, "row-selected",
+ G_CALLBACK (update_buttons), self, G_CONNECT_SWAPPED);
g_signal_connect (priv->input_settings, "changed::" KEY_INPUT_SOURCES,
G_CALLBACK (input_sources_changed), self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]