From: Stefan Csomor Date: Fri, 29 Feb 2008 20:47:07 +0000 (+0000) Subject: adjusting to changed ownership (font is only created in the GetFont call of wxTextAttr) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6a8cbe1b9202ee5eb7a8bfa9b2ce66afeadfad6a adjusting to changed ownership (font is only created in the GetFont call of wxTextAttr) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/textctrl.cpp b/src/mac/carbon/textctrl.cpp index d696159d48..79c591439c 100644 --- a/src/mac/carbon/textctrl.cpp +++ b/src/mac/carbon/textctrl.cpp @@ -1812,11 +1812,12 @@ void wxMacMLTEControl::TXNSetAttribute( const wxTextAttr& style , long from , lo TXNTab* tabs = NULL; bool relayout = false; + wxFont font ; if ( style.HasFont() ) { wxASSERT( typeAttrCount < WXSIZEOF(typeAttr) ); - const wxFont &font = style.GetFont() ; + font = style.GetFont() ; typeAttr[typeAttrCount].tag = kTXNATSUIStyle ; typeAttr[typeAttrCount].size = kTXNATSUIStyleSize ; typeAttr[typeAttrCount].data.dataPtr = font.MacGetATSUStyle() ;