mirror of https://github.com/axmolengine/axmol.git
Bug fix for ActionNode in CocosStudio, please don't use weak reference.
This commit is contained in:
parent
e1656264fc
commit
462796d2dd
|
@ -63,6 +63,8 @@ ActionNode::~ActionNode()
|
||||||
CC_SAFE_RELEASE_NULL(_action);
|
CC_SAFE_RELEASE_NULL(_action);
|
||||||
CC_SAFE_RELEASE_NULL(_actionSpawn);
|
CC_SAFE_RELEASE_NULL(_actionSpawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CC_SAFE_RELEASE(_object);
|
||||||
|
|
||||||
for (auto object : _frameArray)
|
for (auto object : _frameArray)
|
||||||
{
|
{
|
||||||
|
@ -363,7 +365,9 @@ int ActionNode::getActionTag()
|
||||||
|
|
||||||
void ActionNode::setObject(Ref* node)
|
void ActionNode::setObject(Ref* node)
|
||||||
{
|
{
|
||||||
|
CC_SAFE_RELEASE(_object);
|
||||||
_object = node;
|
_object = node;
|
||||||
|
CC_SAFE_RETAIN(_object);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref* ActionNode::getObject()
|
Ref* ActionNode::getObject()
|
||||||
|
|
Loading…
Reference in New Issue