From ef028dfea4fa3ecb66de5acc7938385cf85b0e90 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Thu, 29 Aug 2024 13:11:27 +1000 Subject: [PATCH] Add comment to `TasMovie.AddTasProjLumps` fixes 884110e61 --- src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs index e43b60a718..a8c4951729 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.IO.cs @@ -20,6 +20,8 @@ namespace BizHawk.Client.Common private void AddTasProjLumps(ZipStateSaver bs, bool isBackup = false) { + // at this point, TasStateManager may be null if we're currently importing a .bk2 + var settings = JsonConvert.SerializeObject(TasStateManager?.Settings ?? Session.Settings.DefaultTasStateManagerSettings); bs.PutLump(BinaryStateLump.StateHistorySettings, tw => tw.WriteLine(settings)); bs.PutLump(BinaryStateLump.LagLog, tw => LagLog.Save(tw));