From 34efac1a215ba3104a6759a867e28f1ca2bbe0a8 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 26 May 2019 13:38:23 +0200 Subject: [PATCH] Don't call unimplemented virtual wxListCtrl::OnGetItemIsChecked() This method should only be called when checkboxes are enabled and calling it unconditionally triggered an assert failure. See #18393. Closes https://github.com/wxWidgets/wxWidgets/pull/1330 --- src/generic/listctrl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 1414a9386e..b76844b4bf 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1681,7 +1681,11 @@ void wxListMainWindow::CacheLineData(size_t line) ld->SetImage(col, listctrl->OnGetItemColumnImage(line, col)); } - ld->Check(listctrl->OnGetItemIsChecked(line)); + if ( HasCheckBoxes() ) + { + ld->Check(listctrl->OnGetItemIsChecked(line)); + } + ld->SetAttr(listctrl->OnGetItemAttr(line)); }