1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-26 17:18:41 +02:00

Fix crash from following NULL pointer

GetControlToolBar() can return NULL when closing windows/projects.
This commit is contained in:
James Crook 2018-08-09 18:22:42 +01:00
parent 8c486b50f6
commit ddd1494e75

View File

@ -787,7 +787,11 @@ void Scrubber::OnActivateOrDeactivateApp(wxActivateEvent &event)
{
// First match priority logic...
// Pause if Pause down, or not scrubbing.
if (mProject->GetControlToolBar()->IsPauseDown())
if (!mProject)
Pause(true);
else if (!mProject->GetControlToolBar())
Pause(true);
else if (mProject->GetControlToolBar()->IsPauseDown())
Pause( true );
else if (!IsScrubbing())
Pause( true );