diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-03-04 17:42:04 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-03-04 17:55:44 +0000 |
commit | 2a3b9b17cc32401b45382c42e081733d4f6d1a62 (patch) | |
tree | 2046e696e9f1c284339bc47131370fc0a86985df /cups | |
parent | cbee08400ca895bb5f52de6cf8cb44ba59cc5fd8 (diff) | |
download | ghostpdl-2a3b9b17cc32401b45382c42e081733d4f6d1a62.tar.gz |
Cups device: Windows: avoid using an uninitialised mutex.
Diffstat (limited to 'cups')
-rw-r--r-- | cups/libs/cups/globals.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cups/libs/cups/globals.c b/cups/libs/cups/globals.c index c7440b612..4b878f0a6 100644 --- a/cups/libs/cups/globals.c +++ b/cups/libs/cups/globals.c @@ -103,6 +103,14 @@ _cupsGlobals(void) pthread_once(&cups_globals_key_once, cups_globals_init); #endif /* HAVE_PTHREAD_H */ +#ifdef HAVE_PTHREAD_H +#elif defined(WIN32) + if (!cups_global_mutex.m_init) { + InitializeCriticalSection(&cups_global_mutex.m_criticalSection); + cups_global_mutex.m_init = 1; + } +#endif + /* * See if we have allocated the data yet... */ |