From: Vadim Zeitlin Date: Sun, 9 Dec 2001 13:35:48 +0000 (+0000) Subject: fix for the crash when many listctrl items change state X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ae0d8c14454193a9cb8e95ea28206014ac5aa611 fix for the crash when many listctrl items change state git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 8c05bafe0a..d372557375 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -978,8 +978,10 @@ bool wxSelectionStore::SelectRange(size_t itemFrom, size_t itemTo, // stop counting (see comment below) itemsChanged = NULL; } - - itemsChanged->Add(m_itemsSel[i]); + else + { + itemsChanged->Add(m_itemsSel[i]); + } } m_itemsSel.RemoveAt(i);