mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-02 17:23:18 +02:00
Fix an intermittent crash on exit cased by timer events
This commit is contained in:
parent
ba4fe34947
commit
433e2cf660
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user