delete the TLW used by taskbar icons instead of destroying it to avoid hang on exit if there are no other windows left in the program

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-12-02 16:47:34 +00:00
parent 3a39a9da98
commit bebe622dff

View File

@ -148,11 +148,17 @@ wxTaskBarIcon::wxTaskBarIcon()
wxTaskBarIcon::~wxTaskBarIcon()
{
if (m_iconAdded)
if ( m_iconAdded )
RemoveIcon();
if (m_win)
m_win->Destroy();
if ( m_win )
{
// we must use delete and not Destroy() here because the latter will
// only schedule the window to be deleted during the next idle event
// processing but we may not get any idle events if there are no other
// windows left in the program
delete m_win;
}
}
// Operations