fixed SetAddress() for self-assignment (patch 1430703)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-02-13 15:16:37 +00:00
parent a64bba4eb5
commit fccb65a23c

View File

@ -82,8 +82,11 @@ wxSockAddress::~wxSockAddress()
void wxSockAddress::SetAddress(GAddress *address)
{
GAddress_destroy(m_address);
m_address = GAddress_copy(address);
if ( address != m_address )
{
GAddress_destroy(m_address);
m_address = GAddress_copy(address);
}
}
wxSockAddress& wxSockAddress::operator=(const wxSockAddress& addr)