implemented wxNativeFontInfo::operator=() when wxUSE_PANGO, this fixes crashes when wxFont::SetNativeFontInfo() is used

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-07-21 17:00:13 +00:00
parent ec91fc141f
commit 23afe648ce
2 changed files with 18 additions and 5 deletions

View File

@@ -136,9 +136,21 @@ public:
wxNativeFontInfo() { Init(); }
#if wxUSE_PANGO
wxNativeFontInfo(const wxNativeFontInfo& info);
~wxNativeFontInfo();
#endif
private:
void Init(const wxNativeFontInfo& info);
void Free();
public:
wxNativeFontInfo(const wxNativeFontInfo& info) { Init(info); }
~wxNativeFontInfo() { Free(); }
wxNativeFontInfo& operator=(const wxNativeFontInfo& info)
{
Free();
Init(info);
return *this;
}
#endif // wxUSE_PANGO
// reset to the default state
void Init();