From c4bcd8fcdd68108448a4a839f78adaf4b524bd82 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 15 Dec 2001 23:18:45 +0000 Subject: [PATCH] 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 --- src/univ/winuniv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); } -- 2.47.2