diff --git a/src/Font.cpp b/src/Font.cpp index c14a9e1b..641a7f69 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1133,12 +1133,12 @@ void DrawText(FontObject *font_object, Backend_Surface *surface, int x, int y, u CachedGlyph *glyph = GetGlyphCached(font_object, unicode_value); - if (glyph) + if (glyph != NULL) { const int letter_x = x + pen_x + glyph->x; const int letter_y = y + glyph->y; - if (glyph->backend) + if (glyph->backend != NULL) Backend_DrawGlyph(surface, glyph->backend, letter_x, letter_y, colours); pen_x += glyph->x_advance;