]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/font.cpp
compilation fix for tooltip patch code applied by Julian and w32api
[wxWidgets.git] / src / os2 / font.cpp
index 7b9f1890e68822d97c6f9fd8d8b371901a6d8503..5588a0a0134688d7347ea163d0c930543c3d1dc5 100644 (file)
@@ -35,6 +35,7 @@
 
 #include "wx/fontutil.h"
 #include "wx/fontmap.h"
+#include "wx/encinfo.h"
 
 #include "wx/tokenzr.h"
 
@@ -1139,11 +1140,10 @@ wxFontEncoding wxFont::GetEncoding() const
     return M_FONTDATA->GetEncoding();
 } // end of wxFont::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;
 } // end of wxFont::GetNativeFontInfo
 
 //