From 8f8da19fd47a51724e035a076628d38fde48863c Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Sat, 30 Jul 2011 18:29:29 +0200 Subject: [PATCH] font-face: Cleanup backend-specific destruction code The check for NULL and nil font faces is performed in the shared code. There is no need to duplicate it (in fact, quartz-font and ft-font don't do it). --- src/cairo-toy-font-face.c | 4 ---- src/cairo-win32-font.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c index e82d535fc..363b9a284 100644 --- a/src/cairo-toy-font-face.c +++ b/src/cairo-toy-font-face.c @@ -348,10 +348,6 @@ _cairo_toy_font_face_destroy (void *abstract_face) cairo_toy_font_face_t *font_face = abstract_face; cairo_hash_table_t *hash_table; - if (font_face == NULL || - CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->base.ref_count)) - return; - hash_table = _cairo_toy_font_face_hash_table_lock (); /* All created objects must have been mapped in the hash table. */ assert (hash_table != NULL); diff --git a/src/cairo-win32-font.c b/src/cairo-win32-font.c index 34b71796e..e07a51598 100644 --- a/src/cairo-win32-font.c +++ b/src/cairo-win32-font.c @@ -2098,10 +2098,6 @@ _cairo_win32_font_face_destroy (void *abstract_face) cairo_win32_font_face_t *font_face = abstract_face; cairo_hash_table_t *hash_table; - if (font_face == NULL || - CAIRO_REFERENCE_COUNT_IS_INVALID (&font_face->base.ref_count)) - return; - hash_table = _cairo_win32_font_face_hash_table_lock (); /* All created objects must have been mapped in the hash table. */ assert (hash_table != NULL);