Fix assert failure in SendNotify()

Destroy wxGenericListCtrl children earlier, so that this happens while
this object is still a wxListCtrl and not just a wxWindow, to fix an
assert triggered by the changes of 3eee299cd3 (Micro optimization in
wxListMainWindow::SendNotify(), 2022-06-08).
This commit is contained in:
Vadim Zeitlin 2022-06-08 16:51:32 +02:00
parent 9547cbc6a4
commit 1614d97bb8

View File

@ -4908,6 +4908,10 @@ void wxGenericListCtrl::Init()
wxGenericListCtrl::~wxGenericListCtrl()
{
// Don't wait until the base class does it because our subwindows expect
// their parent window to be a wxListCtrl, but this won't be the case any
// more when we get to the base class dtor (it will be only a wxWindow).
DestroyChildren();
}
void wxGenericListCtrl::CreateOrDestroyHeaderWindowAsNeeded()