mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qom: Remove parent pointer when unparenting
Certain parts of the QOM framework test this pointer to determine if an object is parented. Nuke it when the object is unparented to allow for reuse of an object after unparenting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
committed by
Andreas Färber
parent
53a259da56
commit
d15ae221ea
@@ -402,6 +402,7 @@ void object_unparent(Object *obj)
|
||||
}
|
||||
if (obj->parent) {
|
||||
object_property_del_child(obj->parent, obj, NULL);
|
||||
obj->parent = NULL;
|
||||
}
|
||||
object_unref(obj);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user