mirror of https://github.com/axmolengine/axmol.git
Fixing bug in CCNode::copy bindings. Fixes MoonWarriors crash
This commit is contained in:
parent
1ede7b6434
commit
094d52664d
|
@ -509,6 +509,7 @@ JSBool js_cocos2dx_CCNode_copy(JSContext *cx, uint32_t argc, jsval *vp)
|
|||
cocos2d::CCObject *ret = node->copy();
|
||||
if (ret && jsret) {
|
||||
JS_NEW_PROXY(proxy, ret, jsret);
|
||||
JS_AddNamedObjectRoot(cx, &proxy->obj, typeid(*ret).name());
|
||||
JS_SET_RVAL(cx, vp, OBJECT_TO_JSVAL(jsret));
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue