cocos2d/cocos2d-x — pull request #3306 by timothyqiu (2013-07-28 13:36:19+00:00)
Title: fix crash issue in CCArray::initWithObjects()

The `initWithObjects()` function always crashes.

Array *arr = new Array();
arr->initWithObjects(foo, bar, nullptr);

In the implementation of `initWithObjects()`, `data` is set to `nullptr` by `ccArrayFree()`, but never gets allocated by `ccArrayNew()`. So the following calls to `addObject()` will crash due to the null pointer.