Add NULL check
This commit is contained in:
parent
5bb5da4c4a
commit
e7d3e21632
|
@ -1195,6 +1195,9 @@ FcPatternFormat (FcPattern *pat,
|
||||||
FcChar8 buf_static[8192 - 1024];
|
FcChar8 buf_static[8192 - 1024];
|
||||||
FcBool ret;
|
FcBool ret;
|
||||||
|
|
||||||
|
if (!pat)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
FcStrBufInit (&buf, buf_static, sizeof (buf_static));
|
FcStrBufInit (&buf, buf_static, sizeof (buf_static));
|
||||||
|
|
||||||
ret = FcPatternFormatToBuf (pat, format, &buf);
|
ret = FcPatternFormatToBuf (pat, format, &buf);
|
||||||
|
|
Loading…
Reference in New Issue