editablelabel: Properly clean up in dispose

Unparenting the stack finalizes the entry and label,
but at least the label is available via the
gtk_editable_get_delegate API, and the a11y
implementation uses that at dispose time. So, clear
the pointers to prevent them from being dangling.

This was showing up as a segfault of the doc-shooter.
This commit is contained in:
Matthias Clasen 2020-10-23 12:27:55 -04:00
parent fdb1fa4d08
commit cb8bf6540c

View File

@ -341,6 +341,9 @@ gtk_editable_label_dispose (GObject *object)
g_clear_pointer (&self->stack, gtk_widget_unparent); g_clear_pointer (&self->stack, gtk_widget_unparent);
self->entry = NULL;
self->label = NULL;
G_OBJECT_CLASS (gtk_editable_label_parent_class)->dispose (object); G_OBJECT_CLASS (gtk_editable_label_parent_class)->dispose (object);
} }