[cairo-commit] src/cairo-ft-font.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Feb 27 17:01:22 UTC 2020


 src/cairo-ft-font.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit aee96d175d8349945a6d1948a56abd4b4ec6ad84
Author: Uli Schlachter <psychon at znc.in>
Date:   Sun Feb 17 17:43:39 2019 +0100

    Initialize mutexes in _cairo_ft_unscaled_font_map_lock()
    
    This function is reachable via cairo_ft_font_face_create_for_ft_face()
    -> _cairo_ft_unscaled_font_create_from_face() ->
    _cairo_ft_unscaled_font_create_internal() ->
    _cairo_ft_unscaled_font_map_lock(). Thus, it could happen that nothing
    initialized mutexes before this code runs.
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index ac4908d13..c22da6f95 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -370,6 +370,8 @@ _cairo_ft_unscaled_font_map_destroy (void)
 static cairo_ft_unscaled_font_map_t *
 _cairo_ft_unscaled_font_map_lock (void)
 {
+    CAIRO_MUTEX_INITIALIZE ();
+
     CAIRO_MUTEX_LOCK (_cairo_ft_unscaled_font_map_mutex);
 
     if (unlikely (cairo_ft_unscaled_font_map == NULL)) {


More information about the cairo-commit mailing list