getLastValidIterator() may return a invalid iterator m_array.end().

don't know where this code came from.
This commit is contained in:
Phenix Yu 2011-11-16 11:08:26 +08:00
parent 255293119d
commit dccf577ad3
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ CCTouchHandler* CCTouchDispatcher::findHandler(CCTouchDelegate *pDelegate)
void CCTouchDispatcher::rearrangeHandlers(CCMutableArray<CCTouchHandler*> *pArray) void CCTouchDispatcher::rearrangeHandlers(CCMutableArray<CCTouchHandler*> *pArray)
{ {
std::sort(pArray->begin(), pArray->getLastValidIterator(), less); std::sort(pArray->begin(), pArray->end(), less);
} }
void CCTouchDispatcher::setPriority(int nPriority, CCTouchDelegate *pDelegate) void CCTouchDispatcher::setPriority(int nPriority, CCTouchDelegate *pDelegate)