fontchooser: Remove signal handlers in dispose

Avoid ordering issues in dispose by disconnecting
the rows_changed_cb handler first thing.
This commit is contained in:
Matthias Clasen
2020-09-19 10:44:50 -04:00
parent a9bf129286
commit 4e35d56263

View File

@@ -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);