[cairo-scaled-font-subsets] Add missing malloc check.

A minor oversight in d77b04fd06.
This commit is contained in:
Chris Wilson 2008-06-29 13:09:17 +01:00
parent 22facbe66e
commit 5b7903d5a7

View file

@ -810,7 +810,7 @@ _cairo_scaled_font_subsets_foreach_internal (cairo_scaled_font_subsets_t
collection.glyphs = _cairo_malloc_ab (collection.glyphs_size, sizeof(unsigned long));
collection.utf8 = _cairo_malloc_ab (collection.glyphs_size, sizeof(char *));
if (collection.glyphs == NULL)
if (collection.glyphs == NULL || collection.utf8 == NULL)
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
collection.font_subset_callback = font_subset_callback;