CCTouchDispatcher bug report

CCTouchDispatcher’s m_pTargetedHandlers,m_pHandlersToRemove will cause crash.
the demo is here.
please fix it.
I fix it like this.in method void CCTouchDispatcher::touches(CCSet pTouches, CCEventpEvent, unsigned int uIndex)
i add these lines before
if (m_bToRemove)
{
my code:
CCMutableArray<CCTouchHandler*> *tmpArray = new CCMutableArray<CCTouchHandler*>(8);
for (int i = 0; i < m_pHandlersToAdd~~>count;i++) {
int j;
for {
if >getDelegate == m_pHandlersToRemove>arr[j]) {
break;
}
}
if {
ccCArrayRemoveValueAtIndex;
tmpArray~~>addObject(m_pHandlersToAdd~~>getObjectAtIndex);
}
}
m_pHandlersToAdd~~>removeObjectsInArray(tmpArray);
CC_SAFE_RELEASE(tmpArray);

if (m_bToRemove)


touch_crash_demo.zip (2.5 KB)

void HelloWorld::menuCloseCallback(CCObject* pSender)
{
    menu2->setIsTouchEnabled(true);
    menu2->setIsTouchEnabled(false);
    menu2->setIsTouchEnabled(true);
}

Invoke menu2~~>setIsTouchEnabled; twice will trigger the problem in
<pre>
void CCTouchDispatcher::forceAddHandler
{
unsigned int u = 0;
CCMutableArray<CCTouchHandler*>::CCMutableArrayIterator iter;
for ; iter != pArray~~>end(); ++iter)
{
CCTouchHandler **h =**iter;
if (h)
{
if (h~~>getPriority < pHandler~~>getPriority())
{
++u;
}

if (h~~>getDelegate == pHandler~~>getDelegate())
{
assert(0); // cause the problem
return;
}
}
}

pArray->insertObjectAtIndex(pHandler, u);
}

This problem only exist in debug mode, but it implies that, it is not a good way to do like this.