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