mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-14 17:14:07 +01:00
Bug2127: Record, Pause, Record, Pause, Close button: shouldn't crash
This commit is contained in:
@@ -154,10 +154,11 @@ UIHandle::Result CloseButtonHandle::CommitChanges
|
||||
auto pTrack = mpTrack.lock();
|
||||
if (pTrack)
|
||||
{
|
||||
auto toRemove = pTrack->SubstitutePendingChangedTrack();
|
||||
TransportActions::StopIfPaused( *pProject );
|
||||
if (!ProjectAudioIO::Get( *pProject ).IsAudioActive()) {
|
||||
// This pushes an undo item:
|
||||
TrackUtilities::DoRemoveTrack(*pProject, pTrack.get());
|
||||
TrackUtilities::DoRemoveTrack(*pProject, toRemove.get());
|
||||
// Redraw all tracks when any one of them closes
|
||||
// (Could we invent a return code that draws only those at or below
|
||||
// the affected track?)
|
||||
|
||||
Reference in New Issue
Block a user