Ensure the correct cleanup order for GDI+-related modules in wxMSW.
GDI+ DLL could be unloaded by wxGdiPlusModule before wxGDIPlusRendererModule:: OnExit() was called, resulting in a crash when trying to call a GDI+ function from the latter. Fix this by adding a correct dependency between the modules. Closes #14769. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72717 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2283,6 +2283,12 @@ wxGraphicsBitmap wxGDIPlusRenderer::CreateSubBitmap( const wxGraphicsBitmap &bit
|
||||
class wxGDIPlusRendererModule : public wxModule
|
||||
{
|
||||
public:
|
||||
wxGDIPlusRendererModule()
|
||||
{
|
||||
// We must be uninitialized before GDI+ DLL itself is unloaded.
|
||||
AddDependency("wxGdiPlusModule");
|
||||
}
|
||||
|
||||
virtual bool OnInit() { return true; }
|
||||
virtual void OnExit()
|
||||
{
|
||||
|
Reference in New Issue
Block a user