From 3a593b60845d894ece9e86b967a07e1390949fff Mon Sep 17 00:00:00 2001 From: LotP <22-lotp@users.noreply.git.ryujinx.app> Date: Sat, 6 Dec 2025 20:16:43 -0600 Subject: [PATCH] Fix kaddressarbiter crash (ryubing/ryujinx!235) See merge request ryubing/ryujinx!235 --- .gitignore | 1 + src/Ryujinx.HLE/HOS/Kernel/Threading/KAddressArbiter.cs | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0c46c50c0..6f887e638 100644 --- a/.gitignore +++ b/.gitignore @@ -100,6 +100,7 @@ DocProject/Help/html # Click-Once directory publish/ +RyubingMaintainerTools/ # Publish Web Output *.Publish.xml diff --git a/src/Ryujinx.HLE/HOS/Kernel/Threading/KAddressArbiter.cs b/src/Ryujinx.HLE/HOS/Kernel/Threading/KAddressArbiter.cs index 3e13b917a..c9ac86fc9 100644 --- a/src/Ryujinx.HLE/HOS/Kernel/Threading/KAddressArbiter.cs +++ b/src/Ryujinx.HLE/HOS/Kernel/Threading/KAddressArbiter.cs @@ -529,7 +529,13 @@ 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 threads)) + { + waitingCount = threads.Count; + } + if (waitingCount > 0) {