handle null GreenzoneInvalidated in tasproj recording

this previously hardcrashed the entire program when TAStudio was not open
This commit is contained in:
Morilli 2025-03-17 20:57:15 +01:00
parent 96885ce146
commit 0e9c21e7d3
2 changed files with 3 additions and 3 deletions

View File

@ -51,7 +51,7 @@ namespace BizHawk.Client.Common
LagLog.RemoveFrom(frame);
TasStateManager.InvalidateAfter(frame);
GreenzoneInvalidated(frame);
GreenzoneInvalidated?.Invoke(frame);
Markers.TruncateAt(frame);
ChangeLog.SetGeneralRedo();

View File

@ -122,7 +122,7 @@ namespace BizHawk.Client.Common
{
var anyLagInvalidated = LagLog.RemoveFrom(frame);
var anyStateInvalidated = TasStateManager.InvalidateAfter(frame);
GreenzoneInvalidated(frame);
GreenzoneInvalidated?.Invoke(frame);
if (anyLagInvalidated || anyStateInvalidated)
{
Changes = true;
@ -286,7 +286,7 @@ namespace BizHawk.Client.Common
{
LagLog.RemoveFrom(timelineBranchFrame.Value);
TasStateManager.InvalidateAfter(timelineBranchFrame.Value);
GreenzoneInvalidated(timelineBranchFrame.Value);
GreenzoneInvalidated?.Invoke(timelineBranchFrame.Value);
}
return true;