From: Benjamin Otte Date: Sun, 19 Mar 2023 04:07:17 +0000 (+0100) Subject: cssnode: Refer the correct previous item X-Git-Tag: archive/raspbian/4.12.3+ds-1+rpi1~1^2^2^2~22^2~1^2~527^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f4be5c80c6ce5adc6672484b0c8c43e8009b42d6;p=gtk4.git cssnode: Refer the correct previous item We disconnect from old_previous, not from the new previous. Related: #5646 --- diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c index 3d86740e96..483b1e7ef4 100644 --- a/gtk/gtkcssnode.c +++ b/gtk/gtkcssnode.c @@ -713,7 +713,7 @@ gtk_css_node_reposition (GtkCssNode *node, { GTK_CSS_NODE_GET_CLASS (old_parent)->node_removed (old_parent, node, node->previous_sibling); if (old_parent->children_observer && old_parent != new_parent) - gtk_list_list_model_item_removed (old_parent->children_observer, previous); + gtk_list_list_model_item_removed (old_parent->children_observer, old_previous); if (old_parent->first_child && node->visible) gtk_css_node_invalidate (old_parent->first_child, GTK_CSS_CHANGE_NTH_LAST_CHILD); }