Merge pull request #18 from WenhaiLin/master

Fixed crash
This commit is contained in:
Wenhai Lin
2016-04-07 23:13:02 +08:00
+3 -1
View File
@@ -1297,7 +1297,9 @@ void EventDispatcher::removeEventListenersForTypeKey(const EventListener::TypeKe
// Remove the dirty flag according the 'listenerID'.
// No need to check whether the dispatcher is dispatching event.
_priorityDirtyFlagMap.erase(listenerID);
if (_priorityDirtyFlagMap.find(listenerID) != _priorityDirtyFlagMap.end()) {
_priorityDirtyFlagMap.erase(listenerID);
}
if (_inDispatch == 0)
{