[gtk/gtk-3-24] flowbox: Don't use a removed child after it has been unparented
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] flowbox: Don't use a removed child after it has been unparented
- Date: Thu, 4 Jun 2020 12:24:56 +0000 (UTC)
commit 52d944ec441037f53d758e89645bd9c22d23403e
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Thu Jun 4 11:23:46 2020 +0200
flowbox: Don't use a removed child after it has been unparented
In gtk_flow_box_remove(), call g_sequence_remove() before the child is unparented.
See MR !2029
gtk/gtkflowbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index 5a797f21e9..cd7bd83c51 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3270,8 +3270,8 @@ gtk_flow_box_remove (GtkContainer *container,
if (child == priv->selected_child)
priv->selected_child = NULL;
- gtk_widget_unparent (GTK_WIDGET (child));
g_sequence_remove (CHILD_PRIV (child)->iter);
+ gtk_widget_unparent (GTK_WIDGET (child));
if (was_visible && gtk_widget_get_visible (GTK_WIDGET (box)))
gtk_widget_queue_resize (GTK_WIDGET (box));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]