Add NULL check

This commit is contained in:
Behdad Esfahbod 2013-01-01 20:10:18 -06:00
parent 5bb5da4c4a
commit e7d3e21632
1 changed files with 3 additions and 0 deletions

View File

@ -1195,6 +1195,9 @@ FcPatternFormat (FcPattern *pat,
FcChar8 buf_static[8192 - 1024];
FcBool ret;
if (!pat)
return NULL;
FcStrBufInit (&buf, buf_static, sizeof (buf_static));
ret = FcPatternFormatToBuf (pat, format, &buf);