fixing bug #120870 try to avoid problem with uninitialized mutexes Daniel
* globals.c threads.c: fixing bug #120870 try to avoid problem
with uninitialized mutexes
Daniel
diff --git a/threads.c b/threads.c
index 8db1aac..fd03e66 100644
--- a/threads.c
+++ b/threads.c
@@ -170,8 +170,10 @@
* xmlMutexUnlock() is used to unlock a libxml2 token.
*/
void
-xmlMutexUnlock(xmlMutexPtr tok ATTRIBUTE_UNUSED)
+xmlMutexUnlock(xmlMutexPtr tok)
{
+ if (tok == NULL)
+ return;
#ifdef HAVE_PTHREAD_H
pthread_mutex_unlock(&tok->lock);
#elif defined HAVE_WIN32_THREADS