Fix wxXmlNode self-assignment.
Don't lose the node contents if it's assigned to itself. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,9 +96,13 @@ wxXmlNode::~wxXmlNode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
|
wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
|
||||||
|
{
|
||||||
|
if ( &node != this )
|
||||||
{
|
{
|
||||||
DoFree();
|
DoFree();
|
||||||
DoCopy(node);
|
DoCopy(node);
|
||||||
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user