[gtk/kjellahl/flowboxremove] flowbox: Don't use a removed child after it has been unparented
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kjellahl/flowboxremove] flowbox: Don't use a removed child after it has been unparented
- Date: Thu, 4 Jun 2020 09:26:20 +0000 (UTC)
commit 612955f2b73538bc5f612ea604e500d1f60ad804
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 ddbf34fa33..033b227e45 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -3046,8 +3046,8 @@ gtk_flow_box_remove (GtkFlowBox *box,
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]