diff --git a/cocos2dx/base_nodes/CCNode.cpp b/cocos2dx/base_nodes/CCNode.cpp index b1eb0ce076..5a13af9c15 100644 --- a/cocos2dx/base_nodes/CCNode.cpp +++ b/cocos2dx/base_nodes/CCNode.cpp @@ -697,7 +697,7 @@ void Node::detachChild(Node *child, bool doCleanup) void Node::insertChild(Node* child, int z) { _reorderChildDirty = true; - ccArrayAppendObjectWithResize(_children->data, child); + _children->addObject(child); child->_setZOrder(z); }