Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_test

This commit is contained in:
samuele3hu 2014-11-28 10:48:13 +08:00
commit 3ee29b3124
1 changed files with 2 additions and 1 deletions

View File

@ -308,7 +308,8 @@ void Sprite::setTexture(const std::string &filename)
setTexture(texture);
Rect rect = Rect::ZERO;
rect.size = texture->getContentSize();
if (texture)
rect.size = texture->getContentSize();
setTextureRect(rect);
}