Lua - check if memory callbacks are implemented before attempting to remove memory callbacks

This commit is contained in:
adelikat 2015-01-27 21:48:18 +00:00
parent 8491be66ba
commit 9757709242
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ namespace BizHawk.Client.Common
Global.Emulator.AsInputPollable().InputCallbacks.Remove(function.Callback);
}
if (Global.Emulator.CanDebug())
if (Global.Emulator.CanDebug() && Global.Emulator.MemoryCallbacksAvailable())
{
Global.Emulator.AsDebuggable().MemoryCallbacks.Remove(function.Callback);
}