Commit d9918c3d authored by James Thomas's avatar James Thomas
Browse files

Fix a crash in JackPosixSemaphore::Wait()

Crash was observed in this function when fSemaphore was NULL, this patch
copies the NULL pointer check from the commented function above into
parent e0281d82
......@@ -102,6 +102,11 @@ bool JackPosixSemaphore::Wait()
int res;
if (!fSemaphore) {
jack_error("JackPosixSemaphore::Wait name = %s already deallocated!!", fName);
return false;
while ((res = sem_wait(fSemaphore) < 0)) {
jack_error("JackPosixSemaphore::Wait name = %s err = %s", fName, strerror(errno));
if (errno != EINTR) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment