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