Assert if an invalid column index is specified when inserting wxListCtrl item.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jun 2010 10:35:41 +0000 (10:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 3 Jun 2010 10:35:41 +0000 (10:35 +0000)
commite612dec202d38cf6dd32e6d49cafaf9243f77706
treec8e09638be69cd525c034e693c6856c6c2e4a5ae
parentffcd6cc61e286e421d6bf0e03755755ae8c90577
Assert if an invalid column index is specified when inserting wxListCtrl item.

This also catches the case of inserting an item in a report mode wxListCtrl
without adding any columns to it first. Previously this did result in an
assert but with a less clear error message and, most importantly, still a
crash afterwards. Assert only now, don't crash.

The message could still be improved but hopefully people will be able to
understand that inserting items when no columns are defined is not the right
thing to do.

Closes #12119.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/generic/listctrl.cpp