Skip to content

Commit

Permalink
font: check FT_Get_Postscript_Name return value for NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
astiob committed Oct 22, 2015
1 parent ef19a23 commit a200f77
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libass/ass_font.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ static int add_face(ASS_FontSelector *fontsel, ASS_Font *font, uint32_t ch)
return -1;
}

if (strcmp(FT_Get_Postscript_Name(face), postscript_name) == 0)
const char *face_psname = FT_Get_Postscript_Name(face);
if (face_psname != NULL &&
strcmp(face_psname, postscript_name) == 0)
break;
}
}
Expand Down

0 comments on commit a200f77

Please sign in to comment.