Added check to guard against self-assignment
parent
ed7566fb8d
commit
53eb0f11aa
|
|
@ -427,6 +427,8 @@ byte * ByteQueue::CreatePutSpace(size_t &size)
|
||||||
|
|
||||||
ByteQueue & ByteQueue::operator=(const ByteQueue &rhs)
|
ByteQueue & ByteQueue::operator=(const ByteQueue &rhs)
|
||||||
{
|
{
|
||||||
|
if(this == &rhs) return *this;
|
||||||
|
|
||||||
Destroy();
|
Destroy();
|
||||||
CopyFrom(rhs);
|
CopyFrom(rhs);
|
||||||
return *this;
|
return *this;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue