]> git.saurik.com Git - wxWidgets.git/commitdiff
Check for m_treeCtrl!=NULL, [ wxwindows-Patches-1953459 ] wxGenericDirCtrl::SetFocus...
authorRobert Roebling <robert@roebling.de>
Mon, 28 Apr 2008 17:31:40 +0000 (17:31 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 28 Apr 2008 17:31:40 +0000 (17:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53403 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/dirctrlg.cpp

index 27ae4e40b1c61f99cb77b31e0ed814316474e524..b0f677fdff1f9c1599d2910844fda6f5eecb1710 100644 (file)
@@ -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)