* src/cff/cffdrivr/c (cff_get_ps_name): Avoid unnecessary crash.
The situation can happen if `FT_New_Face` (or one of its siblings) is called with a negative index to get the number of contained faces, followed immediately by a call to `FT_Get_Postscript_Name`. While this is not a valid use of the FreeType library there is no need for a crash. Fixes #1219.
This commit is contained in:
parent
17a0c5dfd5
commit
966ff5a55c
|
@ -634,7 +634,7 @@
|
||||||
return service->get_ps_font_name( FT_FACE( face ) );
|
return service->get_ps_font_name( FT_FACE( face ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (const char*)cff->font_name;
|
return cff ? (const char*)cff->font_name : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue