Skip to content

Commit afaa9be

Browse files
authored
Fix issue #15926
1 parent 21d2204 commit afaa9be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/2d/CCLabel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ Sprite* Label::getLetter(int letterIndex)
17541754
if (_textSprite == nullptr && letterIndex < _lengthOfString)
17551755
{
17561756
const auto &letterInfo = _lettersInfo[letterIndex];
1757-
if (!letterInfo.valid)
1757+
if (!letterInfo.valid || letterInfo.atlasIndex<0)
17581758
{
17591759
break;
17601760
}

0 commit comments

Comments
 (0)