Fix #115167: crash opening files with missing fonts on disk #115168

Merged
Harley Acheson merged 1 commits from lichtwerk/blender:115167 into main 2023-11-20 18:34:43 +01:00
1 changed files with 5 additions and 0 deletions

View File

@ -354,6 +354,11 @@ VChar *BKE_vfontdata_char_from_freetypefont(VFont *vfont, ulong character)
return nullptr;
}
/* nullptr when the font file can't be found on disk. */
if (vfont->temp_pf == nullptr) {
return nullptr;
}
/* Initialize Freetype. */
FT_Library library = nullptr;
FT_Error err = FT_Init_FreeType(&library);