mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-21 14:24:19 +00:00
Fixed: If can’t add child, don’t add to child info
If the call to set_parent() failed, we were still adding the child to the internal list of children, despite that it was not really added. That meant we could later try to do invalid stuff with that non-child. Fix that by asserting and giving up if the child that the user is attempting to add is already parented. https://bugzilla.gnome.org/show_bug.cgi?id=701296
This commit is contained in:
parent
9dde11bdea
commit
be5a7b2db2
@ -235,6 +235,7 @@ gtk_fixed_put (GtkFixed *fixed,
|
||||
|
||||
g_return_if_fail (GTK_IS_FIXED (fixed));
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_if_fail (_gtk_widget_get_parent (widget) == NULL);
|
||||
|
||||
priv = fixed->priv;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user