]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/font.cpp
Removed code duplication introduced during wxUniv merge in 1.132
[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