Merge branch 'issue_488' into 'master'

Allow empty postscript name when using a CFF font in pdf

Closes #488

See merge request cairo/cairo!186
This commit is contained in:
Uli Schlachter 2021-06-02 10:23:26 +00:00
commit 267d0e1c98

View file

@ -554,7 +554,7 @@ cff_index_append_copy (cairo_array_t *index,
element.length = length;
element.is_copy = TRUE;
element.data = _cairo_malloc (element.length);
if (unlikely (element.data == NULL))
if (unlikely (element.data == NULL && length != 0))
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
memcpy (element.data, object, element.length);