TAStudio - fix crash when clicking previous marker button when on the first frame

This commit is contained in:
adelikat 2014-07-17 23:20:10 +00:00
parent 2fdc0e1ecb
commit b6138325ea
1 changed files with 6 additions and 3 deletions

View File

@ -355,9 +355,12 @@ namespace BizHawk.Client.EmuHawk
public void GoToPreviousMarker()
{
var prevMarker = _tas.Markers.Previous(Global.Emulator.Frame);
var prev = prevMarker != null ? prevMarker.Frame : 0;
GoToFrame(prev);
if (Global.Emulator.Frame > 0)
{
var prevMarker = _tas.Markers.Previous(Global.Emulator.Frame);
var prev = prevMarker != null ? prevMarker.Frame : 0;
GoToFrame(prev);
}
}
public void GoToPreviousFrame()