2613
|
1 This file is part of MXE. |
|
2 See index.html for further information. |
|
3 |
|
4 When DllMain is not being run, we need to initialize the font face mutex before using it. |
|
5 |
|
6 diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c |
|
7 index a65d81b..31d854d 100644 |
|
8 --- a/src/win32/cairo-win32-font.c |
|
9 +++ b/src/win32/cairo-win32-font.c |
|
10 @@ -1912,6 +1912,8 @@ _cairo_win32_font_face_hash_table_destroy (void) |
|
11 { |
|
12 cairo_hash_table_t *hash_table; |
|
13 |
|
14 + CAIRO_MUTEX_INITIALIZE (); |
|
15 + |
|
16 /* We manually acquire the lock rather than calling |
|
17 * _cairo_win32_font_face_hash_table_lock simply to avoid creating |
|
18 * the table only to destroy it again. */ |
|
19 @@ -1927,6 +1929,8 @@ _cairo_win32_font_face_hash_table_destroy (void) |
|
20 static cairo_hash_table_t * |
|
21 _cairo_win32_font_face_hash_table_lock (void) |
|
22 { |
|
23 + CAIRO_MUTEX_INITIALIZE (); |
|
24 + |
|
25 CAIRO_MUTEX_LOCK (_cairo_win32_font_face_mutex); |
|
26 |
|
27 if (unlikely (cairo_win32_font_face_hash_table == NULL)) |