[gtk/wip/fontchooser-language-filtering] fontchooser: Remove signal handlers in dispose



commit 4e35d562630802075607705225069557883cbf43
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Sep 19 10:44:50 2020 -0400

    fontchooser: Remove signal handlers in dispose
    
    Avoid ordering issues in dispose by disconnecting
    the rows_changed_cb handler first thing.

 gtk/gtkfontchooserwidget.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkfontchooserwidget.c b/gtk/gtkfontchooserwidget.c
index ede2ce8bf4..0f380f34b9 100644
--- a/gtk/gtkfontchooserwidget.c
+++ b/gtk/gtkfontchooserwidget.c
@@ -856,6 +856,9 @@ gtk_font_chooser_widget_dispose (GObject *object)
 {
   GtkFontChooserWidget *self = GTK_FONT_CHOOSER_WIDGET (object);
 
+  g_signal_handlers_disconnect_by_func (self->selection, rows_changed_cb, self);
+  g_signal_handlers_disconnect_by_func (self->filter_model, rows_changed_cb, self);
+
   self->filter_func = NULL;
   g_clear_pointer (&self->filter_data, self->filter_data_destroy);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]