diff --git a/cocos2dx/actions/CCActionInstant.cpp b/cocos2dx/actions/CCActionInstant.cpp index 5e15afde56..540cf38b83 100644 --- a/cocos2dx/actions/CCActionInstant.cpp +++ b/cocos2dx/actions/CCActionInstant.cpp @@ -443,7 +443,9 @@ CCObject * CCCallFunc::copyWithZone(CCZone *pZone) { CCActionInstant::copyWithZone(pZone); pRet->initWithTarget(m_pSelectorTarget); pRet->m_pCallFunc = m_pCallFunc; - pRet->m_nScriptHandler = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine()->reallocateScriptHandler(m_nScriptHandler); + if (m_nScriptHandler > 0 ) { + pRet->m_nScriptHandler = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine()->reallocateScriptHandler(m_nScriptHandler); + } CC_SAFE_DELETE(pNewZone); return pRet; }