summaryrefslogtreecommitdiff
path: root/src/cairo-type1-fallback.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-05-10 17:17:30 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-05-10 17:18:27 +0100
commitab6a767cf476c98b466c62dd410d0f61f8dd6bbb (patch)
tree62f92fdda9030b11d62281df87bcb66865a584e5 /src/cairo-type1-fallback.c
parentaec92188f1cf4ca34e890b0a4266425532f669d4 (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.c2
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));