mirror of https://github.com/axmolengine/axmol.git
Fixed `ExtensionTest/CocoStudioComponentsTest` crash after applying PR #6011.
This commit is contained in:
parent
fd9ab5c4d1
commit
ecad5ea3ce
|
@ -158,12 +158,6 @@ Node::~Node()
|
||||||
// It may invoke `node->stopAllAction();` while `_actionManager` is null if the next line is after `CC_SAFE_RELEASE_NULL(_actionManager)`.
|
// It may invoke `node->stopAllAction();` while `_actionManager` is null if the next line is after `CC_SAFE_RELEASE_NULL(_actionManager)`.
|
||||||
CC_SAFE_RELEASE_NULL(_userObject);
|
CC_SAFE_RELEASE_NULL(_userObject);
|
||||||
|
|
||||||
CC_SAFE_RELEASE_NULL(_actionManager);
|
|
||||||
CC_SAFE_RELEASE_NULL(_scheduler);
|
|
||||||
|
|
||||||
_eventDispatcher->removeEventListenersForTarget(this);
|
|
||||||
|
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
CC_SAFE_RELEASE_NULL(_shaderProgram);
|
CC_SAFE_RELEASE_NULL(_shaderProgram);
|
||||||
|
|
||||||
|
@ -180,7 +174,12 @@ Node::~Node()
|
||||||
setPhysicsBody(nullptr);
|
setPhysicsBody(nullptr);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
CC_SAFE_RELEASE_NULL(_actionManager);
|
||||||
|
CC_SAFE_RELEASE_NULL(_scheduler);
|
||||||
|
|
||||||
|
_eventDispatcher->removeEventListenersForTarget(this);
|
||||||
|
|
||||||
#if CC_NODE_DEBUG_VERIFY_EVENT_LISTENERS && COCOS2D_DEBUG > 0
|
#if CC_NODE_DEBUG_VERIFY_EVENT_LISTENERS && COCOS2D_DEBUG > 0
|
||||||
_eventDispatcher->debugCheckNodeHasNoEventListenersOnDestruction(this);
|
_eventDispatcher->debugCheckNodeHasNoEventListenersOnDestruction(this);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue