]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/font.cpp
applied patch 890642: wxRE_ADVANCED flag and docs
[wxWidgets.git] / src / msw / font.cpp
index 296142c5852e951b1f84cda50a426865d3515e8e..ae8752a780e12781b71d8d9ad6e25e1544046be9 100644 (file)
@@ -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