summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-08-06 16:38:33 +0000
committerCarl Worth <cworth@cworth.org>2005-08-06 16:38:33 +0000
commit2f1024f83fc971516224b910cec8d3e787740c53 (patch)
treed0aaa1c4e2b0e6815345c2904ec473441959aabf
parent8c52b287f37f8361653030024d7a4a42fc6e54ed (diff)
Fix to return &_cairo_font_face_nil instead of NULL on error.
-rw-r--r--ChangeLog5
-rw-r--r--src/cairo.c7
2 files changed, 7 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a4d3942..630ca003 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;