check for self-assignment in operator=
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
50de831a51
commit
b04237742c
@ -143,8 +143,11 @@ public:
|
||||
|
||||
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
|
||||
{
|
||||
Free();
|
||||
Init(info);
|
||||
if (this != &info)
|
||||
{
|
||||
Free();
|
||||
Init(info);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
#endif // wxUSE_PANGO
|
||||
|
Loading…
Reference in New Issue
Block a user