fix crash if pthread_mutex_unlock is called without ever locking