diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-10 17:17:30 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-10 17:18:27 +0100 |
commit | ab6a767cf476c98b466c62dd410d0f61f8dd6bbb (patch) | |
tree | 62f92fdda9030b11d62281df87bcb66865a584e5 /src/cairo-type1-fallback.c | |
parent | aec92188f1cf4ca34e890b0a4266425532f669d4 (diff) |
[cairo-scaled-font] Check for allocation failure.
cairo_scaled_font_create() returns a nil object on failure whereas a few
callers were checking for NULL.
Secondly review the public entry points for cairo_scaled_font_*() to
ensure that all check that they will not attempt to overwrite the
read-only nil object.
Diffstat (limited to 'src/cairo-type1-fallback.c')
-rw-r--r-- | src/cairo-type1-fallback.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c index 3a0bd1249..387277785 100644 --- a/src/cairo-type1-fallback.c +++ b/src/cairo-type1-fallback.c @@ -106,7 +106,7 @@ cairo_type1_font_create (cairo_scaled_font_subset_t *scaled_font_subset, &font_matrix, &ctm, &font_options); - if (font->type1_scaled_font == NULL) + if (font->type1_scaled_font->status) goto fail; _cairo_array_init (&font->contents, sizeof (unsigned char)); |