diff src/cairo-2-static-init.patch @ 2613:d6edff1d892a

update package cairo
author Hans Petter Jansson <hpj@cl.no>
date Mon, 04 Jun 2012 17:56:56 +0200
parents
children 6aaa1723e277
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/cairo-2-static-init.patch	Mon Jun 04 17:56:56 2012 +0200
@@ -0,0 +1,27 @@
+This file is part of MXE.
+See index.html for further information.
+
+When DllMain is not being run, we need to initialize the font face mutex before using it.
+
+diff --git a/src/win32/cairo-win32-font.c b/src/win32/cairo-win32-font.c
+index a65d81b..31d854d 100644
+--- a/src/win32/cairo-win32-font.c
++++ b/src/win32/cairo-win32-font.c
+@@ -1912,6 +1912,8 @@ _cairo_win32_font_face_hash_table_destroy (void)
+ {
+     cairo_hash_table_t *hash_table;
+ 
++    CAIRO_MUTEX_INITIALIZE ();
++
+     /* We manually acquire the lock rather than calling
+      * _cairo_win32_font_face_hash_table_lock simply to avoid creating
+      * the table only to destroy it again. */
+@@ -1927,6 +1929,8 @@ _cairo_win32_font_face_hash_table_destroy (void)
+ static cairo_hash_table_t *
+ _cairo_win32_font_face_hash_table_lock (void)
+ {
++    CAIRO_MUTEX_INITIALIZE ();
++
+     CAIRO_MUTEX_LOCK (_cairo_win32_font_face_mutex);
+ 
+     if (unlikely (cairo_win32_font_face_hash_table == NULL))