From: Robert Roebling Date: Mon, 28 Apr 2008 17:31:40 +0000 (+0000) Subject: Check for m_treeCtrl!=NULL, [ wxwindows-Patches-1953459 ] wxGenericDirCtrl::SetFocus... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d095f867de4d7c00fe9996f714892141d917f308 Check for m_treeCtrl!=NULL, [ wxwindows-Patches-1953459 ] wxGenericDirCtrl::SetFocus crash git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 27ae4e40b1..b0f677fdff 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -668,7 +668,8 @@ void wxGenericDirCtrl::SetFocus() { // we don't need focus ourselves, give it to the tree so that the user // could navigate it - m_treeCtrl->SetFocus(); + if (m_treeCtrl) + m_treeCtrl->SetFocus(); } void wxGenericDirCtrl::OnBeginEditItem(wxTreeEvent &event)