diff options
Diffstat (limited to 'libparsepcf_destroy_preparsed_font.c')
-rw-r--r-- | libparsepcf_destroy_preparsed_font.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libparsepcf_destroy_preparsed_font.c b/libparsepcf_destroy_preparsed_font.c index 36ec493..ded8cb7 100644 --- a/libparsepcf_destroy_preparsed_font.c +++ b/libparsepcf_destroy_preparsed_font.c @@ -5,6 +5,8 @@ void libparsepcf_destroy_preparsed_font(struct libparsepcf_font *font) { - free(font->_tables); - memset(font, 0, sizeof(*font)); + if (font) { + free(font->_tables); + *font = (struct libparsepcf_font){0}; + } } |