X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4ffab299a1a214fbdd9e3941909323875b32e28..823faac334c990b01975f8fcb91dc72595e6c42d:/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