From 779d7c0cee3ef6ce810b037916e6efd8f09bebde Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 24 Jan 2015 21:33:52 +0000 Subject: [PATCH] Lua - memory library - default to main memory if user did not specify a domain --- BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs b/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs index 47d8a21392..0378357190 100644 --- a/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs +++ b/BizHawk.Client.Common/lua/EmuLuaLibrary.Memory.cs @@ -40,6 +40,11 @@ namespace BizHawk.Client.Common { if (MemoryDomainCore != null) { + if (_currentMemoryDomain == null) + { + _currentMemoryDomain = MemoryDomainCore.MainMemory; + } + return _currentMemoryDomain; } else