[deploy] fix: Actor::RemoveAllChildren not work

This commit is contained in:
Nomango 2020-10-17 01:12:09 +08:00
parent 4ee5653422
commit 4587e5a148
1 changed files with 6 additions and 1 deletions

View File

@ -611,7 +611,12 @@ void Actor::RemoveChildren(const String& child_name)
void Actor::RemoveAllChildren()
{
children_.Clear();
ActorPtr next;
for (ActorPtr child = children_.GetFirst(); child; child = next)
{
next = child->GetNext();
RemoveChild(child);
}
}
bool Actor::ContainsPoint(const Point& point) const