X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17a1ebd101f0653e69736416a2a28d0ada423141..b6b59e43ca3972b4b3d30f0e75440870410dc321:/src/common/sckaddr.cpp?ds=sidebyside diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index 86a440f009..b8a96b2f5f 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -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)