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,12 +144,10 @@ CCSprite* CCSprite::node()
if (pSprite && pSprite->init()) if (pSprite && pSprite->init())
{ {
pSprite->autorelease(); pSprite->autorelease();
return pSprite;
} }
else CC_SAFE_DELETE(pSprite);
{ return NULL;
CC_SAFE_DELETE(pSprite);
}
return pSprite;
} }
bool CCSprite::init(void) bool CCSprite::init(void)