text-freetype2: Fix null pointer dereference

Somehow, there were fonts with empty face names.  Regardless, it's
always important to check your pointers.  Invalid pointers spell doom.
This commit is contained in:
jp9000
2014-10-31 20:33:52 -07:00
parent a21a369ec9
commit 28ac194257

View File

@@ -35,6 +35,9 @@ static void add_font_path(FT_Face face,
struct dstr face_and_style = {0};
struct font_path_info info;
if (!family_in || !path)
return;
dstr_copy(&face_and_style, family_in);
if (face->style_name) {
struct dstr style = {0};