summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2019-02-17 17:43:39 +0100
committerUli Schlachter <psychon@znc.in>2020-02-27 17:01:07 +0000
commitaee96d175d8349945a6d1948a56abd4b4ec6ad84 (patch)
treee2d89766db36af26d45d76502005e50ff707c6e1
parent0ae4e6a8554ce7cc13ba0f23c516ddd7622f660a (diff)
Initialize mutexes in _cairo_ft_unscaled_font_map_lock()HEADmaster
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@znc.in>
-rw-r--r--src/cairo-ft-font.c2
1 files changed, 2 insertions, 0 deletions
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)) {