Assert if inserting an item failed (this is really unexpected and must be a
programmer error) instead of asserting about items number mismatch -- which
might be true but only indirectly helpful.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62429
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
}
}
- long rv = ListView_InsertItem(GetHwnd(), & item);
+ const long rv = ListView_InsertItem(GetHwnd(), & item);
+
+ // failing to insert the item is really unexpected
+ wxCHECK_MSG( rv != -1, rv, "failed to insert an item in wxListCtrl" );
m_count++;
wxASSERT_MSG( m_count == ListView_GetItemCount(GetHwnd()),