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:
parent
10d4023e0d
commit
58d1949f8c
@ -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;
|
||||
|
@ -10507,8 +10507,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichTextModule, wxModule)
|
||||
void wxRichTextModuleInit()
|
||||
{
|
||||
wxModule* module = new wxRichTextModule;
|
||||
module->Init();
|
||||
wxModule::RegisterModule(module);
|
||||
wxModule::InitializeModules();
|
||||
}
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user