0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch 806 B

123456789101112131415161718192021222324252627282930313233
  1. From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
  2. From: Carlos Garcia Campos <cgarcia@igalia.com>
  3. Date: Mon, 19 Nov 2018 12:33:07 +0100
  4. Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
  5. cairo_ft_apply_variations
  6. Fixes a crash when using freetype >= 2.9
  7. Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
  8. ---
  9. src/cairo-ft-font.c | 4 ++++
  10. 1 file changed, 4 insertions(+)
  11. diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
  12. index 325dd61b4..981973f78 100644
  13. --- a/src/cairo-ft-font.c
  14. +++ b/src/cairo-ft-font.c
  15. @@ -2393,7 +2393,11 @@ skip:
  16. done:
  17. free (coords);
  18. free (current_coords);
  19. +#if HAVE_FT_DONE_MM_VAR
  20. + FT_Done_MM_Var (face->glyph->library, ft_mm_var);
  21. +#else
  22. free (ft_mm_var);
  23. +#endif
  24. }
  25. }
  26. --
  27. 2.20.1