]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Update version to 2.9.4 in version.bkl too and rebake everything.
[wxWidgets.git] / src / common / wincmn.cpp
index a8fee417924f5a6b81930cdd26d7dd4dd1b87cdb..969ace7bae41a319f58e6c75d393b7f86dd16339 100644 (file)
@@ -3328,9 +3328,9 @@ void wxWindowBase::DoMoveInTabOrder(wxWindow *win, WindowOrder move)
 
 bool wxWindowBase::HasFocus() const
 {
 
 bool wxWindowBase::HasFocus() const
 {
-    wxWindowBase *win = DoFindFocus();
-    return win == this ||
-           win == wxConstCast(this, wxWindowBase)->GetMainWindowOfCompositeControl();
+    wxWindowBase* const win = DoFindFocus();
+    return win &&
+            (this == win || this == win->GetMainWindowOfCompositeControl());
 }
 
 // ----------------------------------------------------------------------------
 }
 
 // ----------------------------------------------------------------------------