Graphics/TextSprite: Fix undefined behavior
This commit is contained in:
parent
cfa9b4bf2f
commit
fd196cf0ae
|
|
@ -108,6 +108,8 @@ namespace Nz
|
||||||
for (std::size_t i = 0; i < glyphCount; ++i)
|
for (std::size_t i = 0; i < glyphCount; ++i)
|
||||||
{
|
{
|
||||||
const AbstractTextDrawer::Glyph& glyph = drawer.GetGlyph(i);
|
const AbstractTextDrawer::Glyph& glyph = drawer.GetGlyph(i);
|
||||||
|
if (!glyph.atlas)
|
||||||
|
continue;
|
||||||
|
|
||||||
Texture* texture = static_cast<Texture*>(glyph.atlas);
|
Texture* texture = static_cast<Texture*>(glyph.atlas);
|
||||||
if (lastTexture != texture)
|
if (lastTexture != texture)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue