fixed a bug in FTC_Manager_Done
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
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 );
}