]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
Also don't send set focus events when the window is being deleted.
[wxWidgets.git] / src / msw / window.cpp
index 223ae9ef0a37d224fded289e939a31ea93299d11..222138a21c4eda8df1d5643b80b92b215bb6673f 100644 (file)
@@ -3430,6 +3430,13 @@ bool wxWindowMSW::HandleActivate(int state,
 
 bool wxWindowMSW::HandleSetFocus(WXHWND hwnd)
 {
+    // Strangly enough, some controls get set focus events when they are being
+    // deleted, even if they already had focus before.
+    if ( m_isBeingDeleted )
+    {
+        return false;
+    }
+    
     // notify the parent keeping track of focus for the kbd navigation
     // purposes that we got it
     wxChildFocusEvent eventFocus((wxWindow *)this);