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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user