Minor changes.

This commit is contained in:
Nicolas Gramlich 2012-06-01 15:11:42 -07:00
parent eee8ba7586
commit 67d9b8ea25
1 changed files with 3 additions and 5 deletions

View File

@ -144,13 +144,11 @@ CCSprite* CCSprite::node()
if (pSprite && pSprite->init()) if (pSprite && pSprite->init())
{ {
pSprite->autorelease(); pSprite->autorelease();
}
else
{
CC_SAFE_DELETE(pSprite);
}
return pSprite; return pSprite;
} }
CC_SAFE_DELETE(pSprite);
return NULL;
}
bool CCSprite::init(void) bool CCSprite::init(void)
{ {