From: Robin Dunn Date: Tue, 7 May 2013 21:09:31 +0000 (+0000) Subject: Call InitializeModules instead of just module->Init(). This is needed so the module... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/58d1949f8c0d601c2ec3ceafe0a436a36a72ac29?ds=inline 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 --- diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index a4f5b585f4..864f49ebaf 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -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; diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index d272acb553..19f5452f88 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -10507,8 +10507,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxRichTextModule, wxModule) void wxRichTextModuleInit() { wxModule* module = new wxRichTextModule; - module->Init(); wxModule::RegisterModule(module); + wxModule::InitializeModules(); } diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index a600a58db3..5dc68b0df8 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -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