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:
parent
eead25872e
commit
99eeaf27b6
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user