X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/81749bafae06f11fe1c535e48f899af49b4af1ce..f7d2128f3c89b2d00fbac0d8c9798409ae23b408:/src/mac/carbon/window.cpp?ds=sidebyside diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 804c0c2650..aa9503fb3b 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2060,8 +2060,12 @@ void wxWindowMac::GetTextExtent(const wxString& string, int *x, int *y, int *descent, int *externalLeading, const wxFont *theFont ) const { const wxFont *fontToUse = theFont; + wxFont tempFont; if ( !fontToUse ) - fontToUse = &m_font; + { + tempFont = GetFont(); + fontToUse = &tempFont; + } wxClientDC dc( (wxWindowMac*) this ) ; wxCoord lx,ly,ld,le ;