diff --git a/pr/src/pthreads/ptsynch.c b/pr/src/pthreads/ptsynch.c index 3ca6dfff..237a0d6f 100644 --- a/pr/src/pthreads/ptsynch.c +++ b/pr/src/pthreads/ptsynch.c @@ -575,7 +575,7 @@ PR_GetMonitorEntryCount(PRMonitor* mon) rv = pthread_mutex_lock(&mon->lock); PR_ASSERT(0 == rv); - if (pthread_equal(mon->owner, self)) { + if (mon->entryCount != 0 && pthread_equal(mon->owner, self)) { count = mon->entryCount; } rv = pthread_mutex_unlock(&mon->lock);