diff --git a/cocos2dx/base_nodes/CCNode.cpp b/cocos2dx/base_nodes/CCNode.cpp index 0f79605604..ee1bda01c4 100644 --- a/cocos2dx/base_nodes/CCNode.cpp +++ b/cocos2dx/base_nodes/CCNode.cpp @@ -1304,12 +1304,7 @@ void Node::associateEventListener(EventListener* listener) void Node::dissociateEventListener(EventListener* listener) { - auto foundIter = _eventlisteners.find(listener); - if (foundIter != _eventlisteners.end()) - { - (*foundIter)->_type = ""; - _eventlisteners.erase(listener); - } + _eventlisteners.erase(listener); } void Node::removeAllEventListeners()