diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index ca0b834b..a927ef55 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -370,6 +370,11 @@ void YGConfigCopy(const YGConfigRef dest, const YGConfigRef src) { } void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32_t index) { + YGAssertWithNode( + node, + child->getOwner() == nullptr, + "Child already has a owner, it must be removed first."); + YGAssertWithNode( node, node->getMeasure() == nullptr,