]> git.saurik.com Git - wxWidgets.git/commitdiff
delete the TLW used by taskbar icons instead of destroying it to avoid hang on exit...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Dec 2007 16:47:34 +0000 (16:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 2 Dec 2007 16:47:34 +0000 (16:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50428 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/taskbar.cpp

index b03a1bebd15ee591b6bc8a48825c0d8edd315317..83aef42cde8cb73f565a636a90ecffa0c8dd6b8b 100644 (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