Fix possible TAStudio NRE (squashed PR #3936)
* Skip `AskSaveChanges` in disposed `TAStudio`, fix #3499
* Revert "Skip `AskSaveChanges` in disposed `TAStudio`, fix #3499"
This reverts commit eabe939547
.
* Stop calling `AskSaveChanges()` on inactive tools, fix #3499
This commit is contained in:
parent
5da5697f8f
commit
2c6129fb68
|
@ -97,7 +97,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public override bool AskSaveChanges()
|
||||
{
|
||||
if (_unsavedZones.Count == 0 || IsDisposed)
|
||||
if (_unsavedZones.Count == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -616,9 +616,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
return true;
|
||||
}
|
||||
|
||||
return _tools
|
||||
.Select(tool => tool.AskSaveChanges())
|
||||
.All(result => result);
|
||||
return _tools.TrueForAll(tool => !tool.IsActive || tool.AskSaveChanges());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue