Made removeListeners work for Entity

This commit is contained in:
pandamicro
2015-12-25 19:48:22 +08:00
parent b80ccec46b
commit aa22a8d1f9
+1 -1
View File
@@ -796,7 +796,7 @@ cc.eventManager = {
*/
removeListeners: function (listenerType, recursive) {
var i, _t = this;
if (listenerType instanceof _ccsg.Node) {
if (listenerType.__instanceId !== undefined) {
// Ensure the node is removed from these immediately also.
// Don't want any dangling pointers or the possibility of dealing with deleted objects..
delete _t._nodePriorityMap[listenerType.__instanceId];