Hi,
I’ve found a bug in CCMenu. I’m animating my buttons to move and when clicking them while moving it crashes.
I’ve made the following fix:
// Added line is: "m_pSelectedItem != NULL"
void CCMenuFixed::onExit()
{
if (m_eState == kCCMenuStateTrackingTouch && m_pSelectedItem != NULL)
{
m_pSelectedItem->unselected();
m_eState = kCCMenuStateWaiting;
m_pSelectedItem = NULL;
}
CCLayer::onExit();
}