Prevent calling FT_New_Face if path is not valid

This commit is contained in:
twinaphex 2019-08-24 03:25:46 +02:00
parent 7bae97d762
commit 0dc73f2c8e

View File

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