Fixed TAStudio crashing on truncating movie in greenzone.
This commit is contained in:
parent
978ff6eb9d
commit
26c65d727d
|
@ -90,7 +90,7 @@ namespace BizHawk.Client.Common
|
|||
public virtual void Truncate(int frame)
|
||||
{
|
||||
// This is a bad way to do multitrack logic, pass the info in instead of going to the global
|
||||
// and it is weird for Truncte to possibly not truncate
|
||||
// and it is weird for Truncate to possibly not truncate
|
||||
if (!Global.MovieSession.MultiTrack.IsActive)
|
||||
{
|
||||
if (frame < _log.Count)
|
||||
|
|
|
@ -25,13 +25,17 @@ namespace BizHawk.Client.Common
|
|||
StateManager.Capture();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Truncate all frames including starting frame to end of movie.
|
||||
/// </summary>
|
||||
/// <param name="frame">First frame to be truncated.</param>
|
||||
public override void Truncate(int frame)
|
||||
{
|
||||
base.Truncate(frame);
|
||||
|
||||
if (frame < LagLog.Count)
|
||||
{
|
||||
LagLog.RemoveRange(frame + 2, LagLog.Count - frame - 1);
|
||||
LagLog.RemoveRange(frame, LagLog.Count - frame - 1);
|
||||
}
|
||||
|
||||
StateManager.Invalidate(frame + 1);
|
||||
|
|
Loading…
Reference in New Issue