summaryrefslogtreecommitdiff
path: root/src/cairo-toy-font-face.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-toy-font-face.c')
-rw-r--r--[-rwxr-xr-x]src/cairo-toy-font-face.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c
index 363b9a284..4fe94ab09 100755..100644
--- a/src/cairo-toy-font-face.c
+++ b/src/cairo-toy-font-face.c
@@ -342,7 +342,7 @@ cairo_toy_font_face_create (const char *family,
}
slim_hidden_def (cairo_toy_font_face_create);
-static void
+static cairo_bool_t
_cairo_toy_font_face_destroy (void *abstract_face)
{
cairo_toy_font_face_t *font_face = abstract_face;
@@ -352,10 +352,10 @@ _cairo_toy_font_face_destroy (void *abstract_face)
/* All created objects must have been mapped in the hash table. */
assert (hash_table != NULL);
- if (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&font_face->base.ref_count)) {
+ if (! _cairo_reference_count_dec_and_test (&font_face->base.ref_count)) {
/* somebody recreated the font whilst we waited for the lock */
_cairo_toy_font_face_hash_table_unlock ();
- return;
+ return FALSE;
}
/* Font faces in SUCCESS status are guaranteed to be in the
@@ -369,6 +369,7 @@ _cairo_toy_font_face_destroy (void *abstract_face)
_cairo_toy_font_face_hash_table_unlock ();
_cairo_toy_font_face_fini (font_face);
+ return TRUE;
}
static cairo_status_t