1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 16:49:41 +02:00

Don't forget the self-assignment check!

This commit is contained in:
Paul Licameli 2016-02-26 22:28:06 -05:00
parent eead25872e
commit 99eeaf27b6

View File

@ -720,8 +720,10 @@ TrackList::TrackList(const TrackList &that)
TrackList& TrackList::operator= (const TrackList &that)
{
this->Clear(mDestructorDeletesTracks);
DoAssign(that);
if (this != &that) {
this->Clear(mDestructorDeletesTracks);
DoAssign(that);
}
return *this;
}