Merge pull request #6042 from dumganhar/develop

Fixed `ExtensionTest/CocoStudioComponentsTest` crash after applying PR #6011.
This commit is contained in:
James Chen 2014-03-28 14:56:55 +08:00
commit 736362cc22
1 changed files with 6 additions and 7 deletions

View File

@ -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