According to the TSM api, the indexer will never return null, check length instead

This commit is contained in:
adelikat 2019-06-15 16:38:33 -05:00
parent cd0c237e31
commit 394a6d86b5
1 changed files with 1 additions and 1 deletions

View File

@ -900,7 +900,7 @@ namespace BizHawk.Client.EmuHawk
_unpauseAfterSeeking = (fromRewinding || WasRecording) && !Mainform.EmulatorPaused; _unpauseAfterSeeking = (fromRewinding || WasRecording) && !Mainform.EmulatorPaused;
TastudioPlayMode(); TastudioPlayMode();
KeyValuePair<int, byte[]> closestState = CurrentTasMovie.TasStateManager.GetStateClosestToFrame(frame); KeyValuePair<int, byte[]> closestState = CurrentTasMovie.TasStateManager.GetStateClosestToFrame(frame);
if (closestState.Value != null && (frame < Emulator.Frame || closestState.Key > Emulator.Frame)) if (closestState.Value.Length > 0 && (frame < Emulator.Frame || closestState.Key > Emulator.Frame))
{ {
LoadState(closestState); LoadState(closestState);
} }