mirror of https://github.com/axmolengine/axmol.git
Update CCLabel.cpp
in rare case, the texture atlas becomes NULL. Added an additional check to make sure it won't crash here.
This commit is contained in:
parent
bc34554bd9
commit
6f341e3284
|
@ -871,7 +871,7 @@ void Label::setFontScale(float fontScale)
|
||||||
void Label::onDraw(const Mat4& transform, bool transformUpdated)
|
void Label::onDraw(const Mat4& transform, bool transformUpdated)
|
||||||
{
|
{
|
||||||
// Optimization: Fast Dispatch
|
// Optimization: Fast Dispatch
|
||||||
if( _batchNodes.size() == 1 && _textureAtlas->getTotalQuads() == 0 )
|
if( _textureAtlas == NULL || (_batchNodes.size() == 1 && _textureAtlas->getTotalQuads() == 0) )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue