X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd6685b30768d78c58f594c4d9f04fd514e16c95..079cc3b670fb1f68f56c71078afd9af765b43512:/src/os2/font.cpp diff --git a/src/os2/font.cpp b/src/os2/font.cpp index 52e3ec4d2e..5588a0a013 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -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 //