]> git.saurik.com Git - wxWidgets.git/commitdiff
If a base font mapper object was created prematurely before the traints
authorJulian Smart <julian@anthemion.co.uk>
Tue, 6 Jun 2006 11:02:09 +0000 (11:02 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 6 Jun 2006 11:02:09 +0000 (11:02 +0000)
object was created, delete it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index 697aea665658ad9f2097b6a9791beb56e6185873..86741978f9c881db6934a61acf383785a20c098d 100644 (file)
@@ -36,6 +36,9 @@
 #include "wx/ptr_scpd.h"
 #include "wx/module.h"
 #include "wx/except.h"
+#if wxUSE_FONTMAP
+#include "wx/fontmap.h"
+#endif
 
 #if defined(__WXMSW__) && defined(__WXDEBUG__)
     #include "wx/msw/msvcrt.h"
@@ -449,6 +452,13 @@ int wxEntry(int& argc, char **argv)
 {
     ConvertArgsToUnicode(argc, argv);
 
+#if wxUSE_FONTMAP
+    // If we created a font mapper during the above call,
+    // it will only be the base class, so delete it to allow
+    // app traits to create mapper.
+    delete (wxFontMapperBase*) wxFontMapperBase::Set(NULL);
+#endif
+    
     return wxEntry(argc, gs_initData.argv);
 }