1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-22 14:32:58 +02:00

Fix an intermittent crash on exit cased by timer events

This commit is contained in:
Paul Licameli
2019-06-24 11:18:05 -04:00
parent ba4fe34947
commit 433e2cf660

View File

@@ -53,7 +53,15 @@ ProjectAudioManager::~ProjectAudioManager() = default;
void ProjectAudioManager::OnAudioIORate(int rate)
{
auto &project = mProject;
auto &window = GetProjectFrame( project );
// Be careful to null-check the window. We might get to this function
// during shut-down, but a timer hasn't been told to stop sending its
// messages yet.
auto pWindow = ProjectWindow::Find( &project );
if ( !pWindow )
return;
auto &window = *pWindow;
wxString display;
if (rate > 0) {
display = wxString::Format(_("Actual Rate: %d"), rate);