Fix for assert after left click on tree in generic dir dialog in native MSW build. Source cleaning and readability fixes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-11-23 19:58:47 +00:00
parent f05ebffd6b
commit 44d60c0b26
3 changed files with 39 additions and 24 deletions

View File

@@ -278,7 +278,13 @@ void wxGenericDirDialog::OnTreeSelected( wxTreeEvent &event )
if (!m_dirCtrl)
return;
wxDirItemData *data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData(event.GetItem());
wxTreeItemId item = event.GetItem();
wxDirItemData *data = NULL;
if(item.IsOk())
data = (wxDirItemData*)m_dirCtrl->GetTreeCtrl()->GetItemData(item);
if (data)
m_input->SetValue( data->m_path );
};