Call InitializeModules instead of just module->Init(). This is needed so the module will have the proper state and not cause an assert when the modules are cleaned up. Since InitializeModules will skip any that are already initialized it doesn't hurt to call it for modules loaded later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2013-05-07 21:09:31 +00:00
parent 10d4023e0d
commit 58d1949f8c
3 changed files with 3 additions and 3 deletions

View File

@ -159,8 +159,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxPGGlobalVarsClassManager, wxModule)
void wxPGInitResourceModule()
{
wxModule* module = new wxPGGlobalVarsClassManager;
module->Init();
wxModule::RegisterModule(module);
wxModule::InitializeModules();
}
wxPGGlobalVarsClass* wxPGGlobalVars = NULL;

View File

@ -10507,8 +10507,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichTextModule, wxModule)
void wxRichTextModuleInit()
{
wxModule* module = new wxRichTextModule;
module->Init();
wxModule::RegisterModule(module);
wxModule::InitializeModules();
}

View File

@ -2872,8 +2872,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxXmlResourceModule, wxModule)
void wxXmlInitResourceModule()
{
wxModule* module = new wxXmlResourceModule;
module->Init();
wxModule::RegisterModule(module);
wxModule::InitializeModules();
}
#endif // wxUSE_XRC