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:
Vadim Zeitlin
2013-05-15 21:45:25 +00:00
parent 52e4cd7308
commit 9b237f109c

View File

@@ -97,8 +97,12 @@ wxXmlNode::~wxXmlNode()
wxXmlNode& wxXmlNode::operator=(const wxXmlNode& node)
{
DoFree();
DoCopy(node);
if ( &node != this )
{
DoFree();
DoCopy(node);
}
return *this;
}