Check for self-assignment in operator=()
This commit is contained in:
@@ -359,6 +359,9 @@ wxRegionIterator::wxRegionIterator(const wxRegion& region)
|
|||||||
|
|
||||||
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
|
||||||
{
|
{
|
||||||
|
if (this == &ri)
|
||||||
|
return *this;
|
||||||
|
|
||||||
delete [] m_rects;
|
delete [] m_rects;
|
||||||
|
|
||||||
m_current = ri.m_current;
|
m_current = ri.m_current;
|
||||||
|
Reference in New Issue
Block a user