mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-14 04:31:09 +00:00
widget: Don't leak a reference when reordering
When reordering a widget that is alrady under the same parent, we must not take another reference.
This commit is contained in:
parent
c4514e7eb4
commit
0cd0ef2d26
@ -5824,6 +5824,7 @@ gtk_widget_reposition_after (GtkWidget *widget,
|
||||
/* keep this function in sync with gtk_menu_attach_to_widget()
|
||||
*/
|
||||
|
||||
if (priv->parent == NULL)
|
||||
g_object_ref_sink (widget);
|
||||
|
||||
gtk_widget_push_verify_invariants (widget);
|
||||
|
Loading…
Reference in New Issue
Block a user