fix crash when address list does not exist

This commit is contained in:
LotP1 2025-12-07 03:14:09 +01:00
parent 502b365032
commit 3b46629a7b

View File

@ -529,7 +529,13 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
// The value is decremented if the number of threads waiting is less // 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 equal to the Count of threads to be signaled, or Count is zero
// or negative. It is incremented if there are no threads waiting. // 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) if (waitingCount > 0)
{ {