mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-18 14:41:20 +01:00
Don't forget the self-assignment check!
This commit is contained in:
@@ -720,8 +720,10 @@ TrackList::TrackList(const TrackList &that)
|
|||||||
|
|
||||||
TrackList& TrackList::operator= (const TrackList &that)
|
TrackList& TrackList::operator= (const TrackList &that)
|
||||||
{
|
{
|
||||||
this->Clear(mDestructorDeletesTracks);
|
if (this != &that) {
|
||||||
DoAssign(that);
|
this->Clear(mDestructorDeletesTracks);
|
||||||
|
DoAssign(that);
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user