Prevent calling FT_New_Face if path is not valid
This commit is contained in:
parent
7bae97d762
commit
0dc73f2c8e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue