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:
@@ -143,8 +143,11 @@ public:
|
|||||||
|
|
||||||
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
|
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
|
||||||
{
|
{
|
||||||
Free();
|
if (this != &info)
|
||||||
Init(info);
|
{
|
||||||
|
Free();
|
||||||
|
Init(info);
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_PANGO
|
#endif // wxUSE_PANGO
|
||||||
|
Reference in New Issue
Block a user