diff --git a/cocos/base/CCArray.cpp b/cocos/base/CCArray.cpp index 326f931ffa..62af0b697e 100644 --- a/cocos/base/CCArray.cpp +++ b/cocos/base/CCArray.cpp @@ -517,7 +517,8 @@ bool __Array::initWithObjects(Ref* object, ...) do { CC_BREAK_IF(object == nullptr); - + CC_BREAK_IF(!initWithCapacity(1)); + va_list args; va_start(args, object);