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:
parent
a64bba4eb5
commit
fccb65a23c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user