X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f7bcb48fd9a642036a3bf5c70e2b0c9576df1b1..e11898f903183f897a2b2a50a4447ea73ba7273f:/src/generic/filedlgg.cpp diff --git a/src/generic/filedlgg.cpp b/src/generic/filedlgg.cpp index 47c1419984..d50dfad560 100644 --- a/src/generic/filedlgg.cpp +++ b/src/generic/filedlgg.cpp @@ -823,6 +823,10 @@ void wxFileCtrl::SortItems(wxFileData::fileListFieldType field, bool foward) wxFileCtrl::~wxFileCtrl() { + // Normally the data are freed via an EVT_LIST_DELETE_ALL_ITEMS event and + // wxFileCtrl::OnListDeleteAllItems. But if the event is generated after + // the destruction of the wxFileCtrl we need to free any data here: + FreeAllItemsData(); } //-----------------------------------------------------------------------------