From 1fe73f9aab36aa9679f35ccd0f5cc062d5b4d557 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 23 Jan 2020 01:05:29 +0000 Subject: [PATCH] Explicitly compare pointers in Font.cpp to NULL --- src/Font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;