fixed shutdown crashes after recent handlers creation changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2006-09-19 15:22:39 +00:00
parent 4dc9a81d7e
commit 736ce0f79c

View File

@ -588,8 +588,6 @@ private:
wxSortedArrayString m_handlerNames; wxSortedArrayString m_handlerNames;
wxArrayHandlers m_handlers; wxArrayHandlers m_handlers;
wxGTKInputHandler *m_handlerDefault;
wxGTKColourScheme *m_scheme; wxGTKColourScheme *m_scheme;
WX_DECLARE_THEME(gtk) WX_DECLARE_THEME(gtk)
@ -609,20 +607,11 @@ wxGTKTheme::wxGTKTheme()
{ {
m_scheme = NULL; m_scheme = NULL;
m_renderer = NULL; m_renderer = NULL;
m_handlerDefault = NULL;
m_artProvider = NULL; m_artProvider = NULL;
} }
wxGTKTheme::~wxGTKTheme() wxGTKTheme::~wxGTKTheme()
{ {
size_t count = m_handlers.GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( m_handlers[n] != m_handlerDefault )
delete m_handlers[n];
}
delete m_handlerDefault;
delete m_renderer; delete m_renderer;
delete m_scheme; delete m_scheme;
wxArtProvider::RemoveProvider(m_artProvider); wxArtProvider::RemoveProvider(m_artProvider);