diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index bfdd6fec58..4ae36b857e 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -243,6 +243,8 @@ static void *font_renderer_ft_init(const char *font_path, float font_size) else #endif { + if (!path_is_valid(font_path)) + goto error; err = FT_New_Face(handle->lib, font_path, 0, &handle->face); if (err) goto error;