From: Vadim Zeitlin Date: Tue, 19 Feb 2002 14:21:49 +0000 (+0000) Subject: don't crash in SetFocus() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/072da98f10ddb76ab323b41a96936ccbc82348ec?ds=inline don't crash in SetFocus() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 8bb4d60e1d..07141e897e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3440,7 +3440,7 @@ void wxListMainWindow::SetFocus() wxWindow *oldFocus = FindFocus(); - if ( oldFocus->GetParent() == this ) + if ( oldFocus && oldFocus->GetParent() == this ) { wxWindow::SetFocus(); }