X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b84c8078e7be6fdb8afb369e559c331b5416da8..43ff861df48f0837dac98005dd397c5f127ca136:/include/wx/private/sckaddr.h diff --git a/include/wx/private/sckaddr.h b/include/wx/private/sckaddr.h index 7babad5a8b..a0e0ec4ee1 100644 --- a/include/wx/private/sckaddr.h +++ b/include/wx/private/sckaddr.h @@ -137,10 +137,11 @@ public: wxSockAddressImpl& operator=(const wxSockAddressImpl& other) { - free(m_addr); - - InitFromOther(other); - + if (this != &other) + { + free(m_addr); + InitFromOther(other); + } return *this; }