]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
fix for wxComboBox flicker on create (patch 598891)
[wxWidgets.git] / src / msw / window.cpp
index ef3428dcee1b68146f6e0fe111c60f3a8fd0c988..b1b75973f65c2d903f240480d693e945744871d5 100644 (file)
@@ -3298,6 +3298,13 @@ bool wxWindowMSW::HandleKillFocus(WXHWND hwnd)
     }
 #endif
 
+    // Don't send the event when in the process of being deleted.  This can
+    // only cause problems if the event handler tries to access the object.
+    if ( m_isBeingDeleted )
+    {
+        return FALSE;
+    }
+
     wxFocusEvent event(wxEVT_KILL_FOCUS, m_windowId);
     event.SetEventObject(this);