]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/winuniv.cpp
added missing include file for Apple DevTools
[wxWidgets.git] / 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();
     }