diff options
author | Carl Worth <cworth@cworth.org> | 2005-08-06 16:38:33 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-08-06 16:38:33 +0000 |
commit | 2f1024f83fc971516224b910cec8d3e787740c53 (patch) | |
tree | d0aaa1c4e2b0e6815345c2904ec473441959aabf | |
parent | 8c52b287f37f8361653030024d7a4a42fc6e54ed (diff) |
Fix to return &_cairo_font_face_nil instead of NULL on error.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/cairo.c | 7 |
2 files changed, 7 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2005-08-06 Carl Worth <cworth@cworth.org> + + * src/cairo.c (cairo_get_font_face): Fix to return + &_cairo_font_face_nil instead of NULL on error. + 2005-08-06 Jeff Muizelaar <jeff@infidigm.net> * test/a8-mask.c: (main): Give reason for failure. diff --git a/src/cairo.c b/src/cairo.c index f0eebab9..05c87a42 100644 --- a/src/cairo.c +++ b/src/cairo.c @@ -1687,16 +1687,13 @@ cairo_get_font_face (cairo_t *cr) if (cr->status) { _cairo_set_error (cr, cr->status); - return NULL; + return (cairo_font_face_t*) &_cairo_font_face_nil; } cr->status = _cairo_gstate_get_font_face (cr->gstate, &font_face); if (cr->status) { _cairo_set_error (cr, cr->status); - /* XXX: When available: - return _cairo_font_face_nil; - */ - return NULL; + return (cairo_font_face_t*) &_cairo_font_face_nil; } return font_face; |