summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/gd/libgd/gdft.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c
index f196a980fb..c31e6e5867 100644
--- a/ext/gd/libgd/gdft.c
+++ b/ext/gd/libgd/gdft.c
@@ -744,7 +744,7 @@ extern int any2eucjp (char *, char *, unsigned int);
/* Persistent font cache until explicitly cleared */
/* Fonts can be used across multiple images */
-static gdCache_head_t *fontCache;
+static gdCache_head_t *fontCache = NULL;
static FT_Library library;
void
@@ -753,6 +753,7 @@ gdFreeFontCache()
if (fontCache)
{
gdCacheDelete(fontCache);
+ fontCache = NULL;
FT_Done_FreeType(library);
}
}