mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +01:00
Prevent possible dangling pointers to Project from Clipboard
This commit is contained in:
@@ -34,7 +34,7 @@ void Clipboard::Clear()
|
||||
{
|
||||
mT0 = 0.0;
|
||||
mT1 = 0.0;
|
||||
mProject = nullptr;
|
||||
mProject.reset();
|
||||
mTracks->Clear();
|
||||
|
||||
// Emit an event for listeners
|
||||
@@ -42,7 +42,7 @@ void Clipboard::Clear()
|
||||
}
|
||||
|
||||
void Clipboard::Assign( TrackList && newContents,
|
||||
double t0, double t1, AudacityProject *pProject )
|
||||
double t0, double t1, const std::weak_ptr<AudacityProject> &pProject )
|
||||
{
|
||||
newContents.Swap( *mTracks );
|
||||
newContents.Clear();
|
||||
|
||||
Reference in New Issue
Block a user