closed #3833: SceneTest of CocoStudio crashes

This commit is contained in:
James Chen 2014-01-24 11:50:58 +08:00
parent 3d113e1709
commit c6e7093270
2 changed files with 4 additions and 6 deletions

View File

@ -144,10 +144,10 @@ Node* SceneReader::createObject(const rapidjson::Value &dict, cocos2d::Node* par
{
gb->addComponent(com);
}
else
{
CC_SAFE_RELEASE_NULL(com);
}
else
{
com = nullptr;
}
}
if(_fnSelector != nullptr)
{

View File

@ -178,7 +178,6 @@ void TriggerObj::serialize(const rapidjson::Value &val)
CCASSERT(con != nullptr, "");
con->serialize(subDict);
con->init();
con->autorelease();
_cons.pushBack(con);
}
@ -199,7 +198,6 @@ void TriggerObj::serialize(const rapidjson::Value &val)
}
act->serialize(subDict);
act->init();
act->autorelease();
_acts.pushBack(act);
}