diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/kernel/semaphore.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/semaphore.cpp b/src/core/hle/kernel/semaphore.cpp index 5e6139265..8bda2f75d 100644 --- a/src/core/hle/kernel/semaphore.cpp +++ b/src/core/hle/kernel/semaphore.cpp | |||
| @@ -35,7 +35,8 @@ bool Semaphore::ShouldWait(Thread* thread) const { | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void Semaphore::Acquire(Thread* thread) { | 37 | void Semaphore::Acquire(Thread* thread) { |
| 38 | ASSERT_MSG(!ShouldWait(thread), "object unavailable!"); | 38 | if (available_count <= 0) |
| 39 | return; | ||
| 39 | --available_count; | 40 | --available_count; |
| 40 | } | 41 | } |
| 41 | 42 | ||