snes: fix crash when advancing after tracer was disabled
This commit is contained in:
parent
0b1d9c3c48
commit
57b9ff875e
|
@ -645,6 +645,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|||
|
||||
IsLagFrame = true;
|
||||
|
||||
if (!nocallbacks && Tracer.Enabled)
|
||||
api.QUERY_set_trace_callback(tracecb);
|
||||
else
|
||||
api.QUERY_set_trace_callback(null);
|
||||
|
||||
// for deterministic emulation, save the state we're going to use before frame advance
|
||||
// don't do this during nocallbacks though, since it's already been done
|
||||
if (!nocallbacks && DeterministicEmulation)
|
||||
|
@ -660,11 +665,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.SNES
|
|||
savestatebuff = ms.ToArray();
|
||||
}
|
||||
|
||||
if (!nocallbacks && Tracer.Enabled)
|
||||
api.QUERY_set_trace_callback(tracecb);
|
||||
else
|
||||
api.QUERY_set_trace_callback(null);
|
||||
|
||||
// speedup when sound rendering is not needed
|
||||
if (!rendersound)
|
||||
api.QUERY_set_audio_sample(null);
|
||||
|
|
Loading…
Reference in New Issue