mirror of https://github.com/axmolengine/axmol.git
Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_test
This commit is contained in:
commit
3ee29b3124
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue