1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-01 13:50:36 +00:00

posix mutex shouldn't allow NULL

We shouldn't allow mutex lock/unlock to silently do nothing if NULL is
passed, as that is very likely a bug. Beyond that the Windows version
doesn't do this, so it's inconsistent as well.
This commit is contained in:
Matthew Kilgore 2022-06-14 23:56:15 -04:00
parent 869e361ee4
commit 298331e490

View file

@ -31,16 +31,10 @@ void libqb_mutex_free(struct libqb_mutex *mutex) {
}
void libqb_mutex_lock(struct libqb_mutex *m) {
if (m == NULL)
return;
pthread_mutex_lock(&m->mtx);
}
void libqb_mutex_unlock(struct libqb_mutex *m) {
if (m == NULL)
return;
pthread_mutex_unlock(&m->mtx);
}