1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-17 16:28:13 +01:00

more guarded calls

This commit is contained in:
Paul Licameli
2016-12-20 16:15:20 -05:00
parent 01c5f25a19
commit f508493561
3 changed files with 20 additions and 4 deletions

View File

@@ -2509,7 +2509,9 @@ void AudacityProject::OnCloseWindow(wxCloseEvent & event)
wxYES_NO | wxCANCEL | wxICON_QUESTION,
this);
if (result == wxCANCEL || (result == wxYES && !Save())) {
if (result == wxCANCEL || (result == wxYES &&
!GuardedCall<bool>( [&]{ return Save(); } )
)) {
event.Veto();
return;
}