Skip to content

Commit

Permalink
#5508: Fix crash in Linux due to stale wxDataViewItems kept by the wx…
Browse files Browse the repository at this point in the history
…DataViewCtrl implementation
  • Loading branch information
codereader committed Jan 29, 2021
1 parent 8272a95 commit 8024e81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/wxutil/dataview/ResourceTreeView.cpp
Expand Up @@ -346,6 +346,11 @@ void ResourceTreeView::SetSelectedElement(const std::string& value, const TreeMo

void ResourceTreeView::Clear()
{
#ifdef __WXGTK__
// Clear the m_ensureVisibleDefered owned by the wxDataViewCtrl
EnsureVisible(wxDataViewItem(nullptr));
#endif

// Clear any data and/or active population objects
_populator.reset();
_treeStore->Clear();
Expand Down

0 comments on commit 8024e81

Please sign in to comment.