Fix null pointer reference when changing filter in wxGenericDirCtrl

See #18799
This commit is contained in:
Maarten Bent 2020-07-03 23:00:08 +02:00
parent be405158cb
commit 1f0e548e3a

View File

@ -996,7 +996,7 @@ wxString wxGenericDirCtrl::GetPath(wxTreeItemId itemId) const
const wxDirItemData*
data = static_cast<wxDirItemData*>(m_treeCtrl->GetItemData(itemId));
return data->m_path;
return data ? data->m_path : wxString();
}
wxString wxGenericDirCtrl::GetPath() const