pointer returned by GetNativeFontInfo() is now const and must not be deleted (replaces patch 810192)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1140,11 +1140,10 @@ wxFontEncoding wxFont::GetEncoding() const
|
||||
return M_FONTDATA->GetEncoding();
|
||||
} // end of wxFont::GetEncoding
|
||||
|
||||
wxNativeFontInfo* wxFont::GetNativeFontInfo() const
|
||||
const wxNativeFontInfo* wxFont::GetNativeFontInfo() const
|
||||
{
|
||||
if (M_FONTDATA->HasNativeFontInfo())
|
||||
return new wxNativeFontInfo(M_FONTDATA->GetNativeFontInfo());
|
||||
return 0;
|
||||
return M_FONTDATA->HasNativeFontInfo() ? &(M_FONTDATA->GetNativeFontInfo())
|
||||
: NULL;
|
||||
} // end of wxFont::GetNativeFontInfo
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user