1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 09:20:16 +01:00

Bug2127: Record, Pause, Record, Pause, Close button: shouldn't crash

This commit is contained in:
Paul Licameli
2019-06-28 09:25:44 -04:00
parent 6aba4a3fc7
commit c50acea328
3 changed files with 9 additions and 2 deletions

View File

@@ -1183,7 +1183,7 @@ bool TrackList::ApplyPendingTracks()
return result;
}
std::shared_ptr<const Track> Track::SubstitutePendingChangedTrack() const
std::shared_ptr<Track> Track::SubstitutePendingChangedTrack()
{
// Linear search. Tracks in a project are usually very few.
auto pList = mList.lock();
@@ -1199,6 +1199,11 @@ std::shared_ptr<const Track> Track::SubstitutePendingChangedTrack() const
return SharedPointer();
}
std::shared_ptr<const Track> Track::SubstitutePendingChangedTrack() const
{
return const_cast<Track*>(this)->SubstitutePendingChangedTrack();
}
std::shared_ptr<const Track> Track::SubstituteOriginalTrack() const
{
auto pList = mList.lock();