Fix sfntfont.c build without mmap

* src/sfntfont.c (sfntfont_close): Don't unlink font if mmap is
not available.
This commit is contained in:
Po Lu 2023-02-19 20:23:36 +08:00
parent 47dbdb06dc
commit c09dca3fb0

View file

@ -2565,6 +2565,8 @@ sfntfont_close (struct font *font)
xfree (info->cvt);
xfree (info->interpreter);
#ifdef HAVE_MMAP
/* Unlink INFO. */
next = &open_fonts;
@ -2575,6 +2577,8 @@ sfntfont_close (struct font *font)
*next = info->next;
info->next = NULL;
#endif /* HAVE_MMAP */
sfntfont_free_outline_cache (&info->outline_cache);
sfntfont_free_raster_cache (&info->raster_cache);
}