X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4ffab299a1a214fbdd9e3941909323875b32e28..3a7c125370cf6fd2b66eb06ba031efcfd5c5b9b0:/src/msw/font.cpp?ds=sidebyside diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 296142c585..ae8752a780 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -948,12 +948,10 @@ wxFontEncoding wxFont::GetEncoding() const return M_FONTDATA->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; } bool wxFont::IsFixedWidth() const