diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-08 17:26:22 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-05-08 22:00:46 +0100 |
commit | ede76a97ea5b68c3bd042dc6a93ecb1aa7c9761c (patch) | |
tree | 123be40b5b3b38c1a7bd61e12c6e25116edf136b /src/cairo-font-face.c | |
parent | c441938569ed78123a57662a70ef5a74dcf73851 (diff) | |
download | cairo-ede76a97ea5b68c3bd042dc6a93ecb1aa7c9761c.tar.gz |
[cairo-font-options] Check for the nil-object.
The design is for the user to create a cairo_font_options_t object with
cairo_font_options_create() and then is free to use it with any Cairo
operation. This requires us to check when we may be about to overwrite
the read-only nil object.
Diffstat (limited to 'src/cairo-font-face.c')
-rw-r--r-- | src/cairo-font-face.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cairo-font-face.c b/src/cairo-font-face.c index f254c3b7e..3b6dab3b6 100644 --- a/src/cairo-font-face.c +++ b/src/cairo-font-face.c @@ -455,6 +455,11 @@ _cairo_toy_font_face_scaled_font_create (void *abstract_font_face { cairo_toy_font_face_t *font_face = abstract_font_face; const cairo_scaled_font_backend_t * backend = CAIRO_SCALED_FONT_BACKEND_DEFAULT; + cairo_status_t status; + + status = cairo_font_options_status ((cairo_font_options_t *) options); + if (status) + return status; return backend->create_toy (font_face, font_matrix, ctm, options, scaled_font); |