X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08df3e4420ae2013b5f0e19ab345bd72ce3c11a1..8f52ea33e91a7aeca6c62084faf6968c1acfaac8:/src/univ/winuniv.cpp diff --git a/src/univ/winuniv.cpp b/src/univ/winuniv.cpp index e768483c3f..dbb420c484 100644 --- a/src/univ/winuniv.cpp +++ b/src/univ/winuniv.cpp @@ -366,7 +366,7 @@ bool wxWindow::Enable(bool enable) return FALSE; // disabled window can't keep focus - if ( FindFocus() == this ) + if ( FindFocus() == this && GetParent() != NULL ) { GetParent()->SetFocus(); }