diff --git a/ReactCommon/yoga/yoga/Yoga.cpp b/ReactCommon/yoga/yoga/Yoga.cpp index ca0b834b0..a927ef556 100644 --- a/ReactCommon/yoga/yoga/Yoga.cpp +++ b/ReactCommon/yoga/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,