mirror of https://github.com/axmolengine/axmol.git
Fix crash when missing image resource of FNT font.
This commit is contained in:
parent
ac0fb68989
commit
7119a5855d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue