]> git.saurik.com Git - wxWidgets.git/commitdiff
adjusting to changed ownership (font is only created in the GetFont call of wxTextAttr)
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Feb 2008 20:47:07 +0000 (20:47 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 29 Feb 2008 20:47:07 +0000 (20:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/textctrl.cpp

index d696159d4889029d67851c82c021ceed01dcfa8b..79c591439cd03e4706877389fe88e572a0682f2c 100644 (file)
@@ -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() ;