mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-11 07:37:06 +00:00
Fix kaddressarbiter crash
Fixes a crash when trying to access the thread count on a not (yet) existing list of threads.
This commit is contained in:
parent
e404954f88
commit
2ba33ec2ef
1 changed files with 6 additions and 1 deletions
|
|
@ -529,7 +529,12 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
|
|||
// The value is decremented if the number of threads waiting is less
|
||||
// or equal to the Count of threads to be signaled, or Count is zero
|
||||
// or negative. It is incremented if there are no threads waiting.
|
||||
int waitingCount = _arbiterThreads[address].Count;
|
||||
int waitingCount = 0;
|
||||
|
||||
if (_arbiterThreads.TryGetValue(address, out List<KThread> threads))
|
||||
{
|
||||
waitingCount = threads.Count;
|
||||
}
|
||||
|
||||
if (waitingCount > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue