From 997558076f323e5da568a1acadb777d2cab18fb1 Mon Sep 17 00:00:00 2001 From: adelikat Date: Thu, 5 Mar 2015 01:07:31 +0000 Subject: [PATCH] If a core has no system bus, default to main memory if SystemBus is requested, fixes cheat dialog from blowing up on a bunch of cores with no system bus defined --- .../Base Implementations/MemoryDomain.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs index f95d29992d..7a878e702d 100644 --- a/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs +++ b/BizHawk.Emulation.Common/Base Implementations/MemoryDomain.cs @@ -270,7 +270,14 @@ namespace BizHawk.Emulation.Common return _systemBus; } - return this.FirstOrDefault(x => x.Name == "System Bus"); + var bus = this.FirstOrDefault(x => x.Name == "System Bus"); + + if (bus != null) + { + return bus; + } + + return MainMemory; } set