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:
@@ -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 );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user