forked from AuroraMiddleware/gtk
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,7 +5824,8 @@ gtk_widget_reposition_after (GtkWidget *widget,
|
||||
/* keep this function in sync with gtk_menu_attach_to_widget()
|
||||
*/
|
||||
|
||||
g_object_ref_sink (widget);
|
||||
if (priv->parent == NULL)
|
||||
g_object_ref_sink (widget);
|
||||
|
||||
gtk_widget_push_verify_invariants (widget);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user