From 5ff2b8535ff17ca14eb80a13edbc4929700e5645 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Wed, 5 Aug 2020 14:08:07 -0700 Subject: [PATCH] textview: properly remove anchored widgets Fixes #3021 --- gtk/gtktextview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 7a53f2d029..806635b620 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -2053,7 +2053,7 @@ gtk_text_view_set_buffer (GtkTextView *text_view, while (priv->anchored_children.length) { AnchoredChild *ac = g_queue_peek_head (&priv->anchored_children); - gtk_widget_unparent (ac->widget); + gtk_text_view_remove (text_view, ac->widget); /* ac is now invalid! */ }