summaryrefslogtreecommitdiff
path: root/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'mutex.c')
-rw-r--r--mutex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mutex.c b/mutex.c
index 0396e5f..22a7e7b 100644
--- a/mutex.c
+++ b/mutex.c
@@ -632,7 +632,10 @@ pthread_mutex_lock(pthread_mutex_t *mutex)
*/
if (*mutex == (pthread_mutex_t) PTW32_OBJECT_AUTO_INIT)
{
- result = ptw32_mutex_check_need_init(mutex);
+ if ((result = ptw32_mutex_check_need_init(mutex)) != 0)
+ {
+ return(result);
+ }
}
mx = *mutex;