Explicitly compare pointers in Font.cpp to NULL

This commit is contained in:
Clownacy 2020-01-23 01:05:29 +00:00
parent 413fe560e4
commit 1fe73f9aab

View file

@ -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;