From 94e3bfafa010384f652ed5ebf2e25a6fde247c1f Mon Sep 17 00:00:00 2001 From: David Turner Date: Wed, 8 Nov 2000 00:15:58 +0000 Subject: [PATCH] fixed a small bug in the abstract chunk cache class --- src/cache/ftcchunk.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/cache/ftcchunk.c b/src/cache/ftcchunk.c index c26c74d50..a8dec04d3 100644 --- a/src/cache/ftcchunk.c +++ b/src/cache/ftcchunk.c @@ -183,16 +183,19 @@ FT_ListNode lrunode; - lrunode = FTC_CHUNKNODE_TO_LRUNODE( node ); - - manager->num_bytes -= clazz->size_node( node ); - manager->num_nodes--; + if (node) + { + lrunode = FTC_CHUNKNODE_TO_LRUNODE( node ); - FT_List_Remove( glyphs_lru, lrunode ); + manager->num_bytes -= clazz->size_node( node ); + manager->num_nodes--; - clazz->destroy_node( node ); + FT_List_Remove( glyphs_lru, lrunode ); + + clazz->destroy_node( node ); - bucket[0] = 0; + bucket[0] = 0; + } } if ( clazz->done )