From 7bff28bdee0b2e84703d2a701d557476bd8e8474 Mon Sep 17 00:00:00 2001
From: adelikat <adelikat@tasvideos.org>
Date: Sat, 12 Nov 2016 11:55:20 -0600
Subject: [PATCH] Lua - memory library - actually default to system bus,
 previous commit was unsufficient

---
 .../lua/EmuLuaLibrary.Memory.cs               | 26 +++++++------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs
index 0ebf6c38c8..25303256bd 100644
--- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs
+++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs
@@ -15,26 +15,13 @@ namespace BizHawk.Client.Common
 		public MemoryLuaLibrary(Lua lua)
 			: base(lua)
 		{
-			if (MemoryDomainCore != null)
-			{
-				if (MemoryDomainCore.HasSystemBus)
-				{
-					_currentMemoryDomain = MemoryDomainCore.SystemBus;
-				}
-				else
-				{
-					_currentMemoryDomain = MemoryDomainCore.MainMemory;
-				}
-			}
+			
 		}
 
 		public MemoryLuaLibrary(Lua lua, Action<string> logOutputCallback)
 			: base(lua, logOutputCallback)
 		{
-			if (MemoryDomainCore != null)
-			{
-				_currentMemoryDomain = MemoryDomainCore.MainMemory;
-			}
+			
 		}
 
 		public override string Name { get { return "memory"; } }
@@ -47,7 +34,14 @@ namespace BizHawk.Client.Common
 				{
 					if (_currentMemoryDomain == null)
 					{
-						_currentMemoryDomain = MemoryDomainCore.MainMemory;
+						if (MemoryDomainCore.HasSystemBus)
+						{
+							_currentMemoryDomain = MemoryDomainCore.SystemBus;
+						}
+						else
+						{
+							_currentMemoryDomain = MemoryDomainCore.MainMemory;
+						}
 					}
 
 					return _currentMemoryDomain;