]> git.saurik.com Git - wxWidgets.git/commitdiff
added assert checking the column index validity (see #10687)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Apr 2009 11:11:41 +0000 (11:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Apr 2009 11:11:41 +0000 (11:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index f0f2b63311fb5eb0b7f5567daf1c6a6636bbe1ff..b5bbc4a4be1d8ea08cd5345d058cebe428ea68b3 100644 (file)
@@ -3200,6 +3200,9 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
                                    const wxListItem& info,
                                    LV_ITEM& lvItem)
 {
+    wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(),
+                  "wxListCtrl column index out of bounds" );
+
     lvItem.iItem = (int) info.m_itemId;
 
     lvItem.iImage = info.m_image;