mirror of https://github.com/axmolengine/axmol.git
Merge pull request #6042 from dumganhar/develop
Fixed `ExtensionTest/CocoStudioComponentsTest` crash after applying PR #6011.
This commit is contained in:
commit
736362cc22
|
@ -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);
|
||||||
|
|
||||||
|
@ -181,6 +175,11 @@ Node::~Node()
|
||||||
|
|
||||||
#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