]> git.saurik.com Git - wxWidgets.git/commitdiff
Avoid double destruction of wxTipWindow under wxOSX.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Oct 2012 01:20:21 +0000 (01:20 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Oct 2012 01:20:21 +0000 (01:20 +0000)
Hiding the window results in wxEVT_KILL_FOCUS under OS X and this destroys it
already, so when we call Destroy() from wxTipWindow::Close() later, it
triggers assert about destroying it twice.

Avoid doing this under OS X for now, even though the real problem is probably
the discrepancy in wxEVT_KILL_FOCUS event generation under different platforms.

Closes #14651.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/tipwin.cpp

index b50fb47a9647790dc36e8a521bb159da1e5943fc..ede0ae3913d9ab9bdfb4652fcd18fd917c651000 100644 (file)
@@ -226,7 +226,11 @@ void wxTipWindow::Close()
         if ( m_view->HasCapture() )
             m_view->ReleaseMouse();
     #endif
-    Destroy();
+    // Under OS X we get destroyed because of wxEVT_KILL_FOCUS generated by
+    // Show(false).
+    #ifndef __WXOSX__
+        Destroy();
+    #endif
 #else
     wxFrame::Close();
 #endif