]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed a segfaulting bug in wxUniv: invalid assumption that every window has a parent
authorVáclav Slavík <vslavik@fastmail.fm>
Sat, 15 Dec 2001 23:18:45 +0000 (23:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sat, 15 Dec 2001 23:18:45 +0000 (23:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13036 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/winuniv.cpp

index e768483c3fa89360ed5d70c867ff8ffc6cd95306..dbb420c484c78fcf24e4b33ff5d96105654a78fd 100644 (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();
     }