fixed a segfaulting bug in wxUniv: invalid assumption that every window has a parent

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2001-12-15 23:18:45 +00:00
parent 65d48d095f
commit c4bcd8fcdd

View File

@@ -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();
}