Fix #115167: crash opening files with missing fonts on disk
Check for linked fonts not found on disk. Pull Request: https://projects.blender.org/blender/blender/pulls/115168
This commit is contained in:
committed by
Harley Acheson
parent
4edc138933
commit
e2fbcb4632
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user