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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user