add natt suggestion of a try/catch attempts to load tasproj greenzone, puts a big ol piece of duct tape on the real problem but at least users can continue to use their file, fixes #2479 about as well as we can since we have no info as to how the greenzone got corrupted in the first place

This commit is contained in:
adelikat 2021-01-16 11:00:30 -06:00
parent 97e4d42b7b
commit 2f6bbd155f
1 changed files with 11 additions and 2 deletions

View File

@ -167,8 +167,17 @@ namespace BizHawk.Client.Common
bl.GetLump(BinaryStateLump.StateHistory, false, delegate(BinaryReader br, long length)
{
TasStateManager?.Dispose();
TasStateManager = ZwinderStateManager.Create(br, settings, IsReserved);
try
{
TasStateManager?.Dispose();
TasStateManager = ZwinderStateManager.Create(br, settings, IsReserved);
}
catch
{
// Do nothing, if state history got corrupted, the file is still very much useable
// and we would want the user to be able to load, and regenerate their state history
// however, we still have an issue of how state history got corrupted
}
});
}
}