invalid pointer check in void TexturePVRRGB888::onEnter().

This commit is contained in:
James Chen 2012-04-10 18:43:00 +08:00
parent 6823704a46
commit b6cc0658f3
1 changed files with 6 additions and 2 deletions

View File

@ -669,8 +669,12 @@ void TexturePVRRGB888::onEnter()
CCSize s = CCDirector::sharedDirector()->getWinSize();
CCSprite *img = CCSprite::spriteWithFile("Images/test_image_rgb888.pvr");
img->setPosition(ccp( s.width/2.0f, s.height/2.0f));
addChild(img);
if (img != NULL)
{
img->setPosition(ccp( s.width/2.0f, s.height/2.0f));
addChild(img);
}
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();
}