From 2e234473cadb6884a06615c1a5cca82026c47012 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Wed, 4 Apr 2018 10:30:16 -0700 Subject: [PATCH] [yoga re-add assertion to check for owner reference before adding child. Summary: this diff re-add the assertion to check for owner reference before adding child that was removed by mistake in previous diff Reviewed By: emilsjolander Differential Revision: D7495417 fbshipit-source-id: b81174aeea3f2796d76ccdae4a8eddd0beace0aa --- yoga/Yoga.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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,