mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-21 15:56:58 +02:00
Try fixing a strange error when initializing a POSIX mutex.
https://github.com/mackron/miniaudio/issues/733
This commit is contained in:
+9
-1
@@ -16178,7 +16178,15 @@ static void ma_thread_wait__posix(ma_thread* pThread)
|
||||
|
||||
static ma_result ma_mutex_init__posix(ma_mutex* pMutex)
|
||||
{
|
||||
int result = pthread_mutex_init((pthread_mutex_t*)pMutex, NULL);
|
||||
int result;
|
||||
|
||||
if (pMutex == NULL) {
|
||||
return MA_INVALID_ARGS;
|
||||
}
|
||||
|
||||
MA_ZERO_OBJECT(pMutex);
|
||||
|
||||
result = pthread_mutex_init((pthread_mutex_t*)pMutex, NULL);
|
||||
if (result != 0) {
|
||||
return ma_result_from_errno(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user