Commit 91bb16583bb6554fb45243f016054ea576e07086

David Turner 2000-12-05T22:23:12

fixed a bug in FTC_Manager_Done

diff --git a/ChangeLog b/ChangeLog
index 07b0cd0..704e533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-12-05  David Turner  <david.turner@freetype.org>
 
+	* src/cache/ftcmanag.c (FTC_Manager_Done): fixed a bug that caused
+        an occasional crash when the function was called (due to a dangling
+        pointer)
+
 	* src/base/ftsystem.c (FT_Done_Memory): fixed an obvious bug,
 	the ANSI "free" function was called, instead of "memory->free()"
 
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index 301aad0..363b214 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -139,6 +139,7 @@
     FT_UNUSED( lru );
 
     FT_Done_Size( (FT_Size)node->root.data );
+    node->root.data = 0;
   }
 
 
@@ -299,8 +300,11 @@
     }
 
     /* discard faces and sizes */
-    FT_Lru_Done( manager->sizes_lru );
     FT_Lru_Done( manager->faces_lru );
+    manager->faces_lru = 0;
+    
+    FT_Lru_Done( manager->sizes_lru );
+    manager->sizes_lru;
 
     FREE( manager );
   }