Explicitly compare pointers in Font.cpp to NULL
This commit is contained in:
parent
413fe560e4
commit
1fe73f9aab
1 changed files with 2 additions and 2 deletions
|
@ -1133,12 +1133,12 @@ void DrawText(FontObject *font_object, Backend_Surface *surface, int x, int y, u
|
||||||
|
|
||||||
CachedGlyph *glyph = GetGlyphCached(font_object, unicode_value);
|
CachedGlyph *glyph = GetGlyphCached(font_object, unicode_value);
|
||||||
|
|
||||||
if (glyph)
|
if (glyph != NULL)
|
||||||
{
|
{
|
||||||
const int letter_x = x + pen_x + glyph->x;
|
const int letter_x = x + pen_x + glyph->x;
|
||||||
const int letter_y = y + glyph->y;
|
const int letter_y = y + glyph->y;
|
||||||
|
|
||||||
if (glyph->backend)
|
if (glyph->backend != NULL)
|
||||||
Backend_DrawGlyph(surface, glyph->backend, letter_x, letter_y, colours);
|
Backend_DrawGlyph(surface, glyph->backend, letter_x, letter_y, colours);
|
||||||
|
|
||||||
pen_x += glyph->x_advance;
|
pen_x += glyph->x_advance;
|
||||||
|
|
Loading…
Add table
Reference in a new issue