Fix crash when missing image resource of FNT font.

This commit is contained in:
Dhilan007 2014-11-24 15:57:00 +08:00
parent ac0fb68989
commit 7119a5855d
1 changed files with 0 additions and 2 deletions

View File

@ -676,7 +676,6 @@ FontFNT * FontFNT::create(const std::string& fntFilePath, const Vec2& imageOffse
Texture2D *tempTexture = Director::getInstance()->getTextureCache()->addImage(newConf->getAtlasName());
if (!tempTexture)
{
delete newConf;
return nullptr;
}
@ -684,7 +683,6 @@ FontFNT * FontFNT::create(const std::string& fntFilePath, const Vec2& imageOffse
if (!tempFont)
{
delete newConf;
return nullptr;
}
tempFont->autorelease();