X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08df3e4420ae2013b5f0e19ab345bd72ce3c11a1..d21d2e5adf7a5acf3b496a9c4e87eab220bd75d8:/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(); }