From fc446868a76a21de6fce4459c732c3dfd8b55947 Mon Sep 17 00:00:00 2001
From: YoshiRulz <OSSYoshiRulz+git@gmail.com>
Date: Fri, 23 Aug 2024 16:45:44 +1000
Subject: [PATCH] Fix `BootGodDb.Identify` mutating lookup

fixes f010d6f80, 633216be1
---
 src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/BootGodDB.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/BootGodDB.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/BootGodDB.cs
index b71f28f367..b314e592b2 100644
--- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/BootGodDB.cs
+++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/NES/BootGodDB.cs
@@ -158,7 +158,7 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
 #else
 			if (acquire == null) throw new InvalidOperationException("Bootgod DB not initialized. It's a client responsibility because only a client knows where the database is located.");
 			acquire.WaitOne();
-			return instance._sha1Table.GetValueOrPutNew(sha1);
+			return instance._sha1Table.TryGetValue(sha1, out var l) ? l : new(capacity: 0);
 #endif
 		}
 	}