coverity#705112 Using invalid iterator

Change-Id: I95a4646e7ecff90babd8c140fdfa5f6fc47ce399
This commit is contained in:
Caolán McNamara
2016-04-04 10:04:23 +01:00
parent f9dd9b8679
commit e5c7c96970

View File

@@ -792,8 +792,8 @@ void OFieldExpressionControl::DeleteRows()
// we use this way to create undo actions
m_pParent->m_pController->executeChecked(SID_GROUP_REMOVE,aArgs);
::std::vector<sal_Int32>::iterator aFind = ::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos);
::std::vector<sal_Int32>::const_iterator aEnd = m_aGroupPositions.end();
std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end();
std::vector<sal_Int32>::iterator aFind = std::find(m_aGroupPositions.begin(), aEnd, nGroupPos);
if (aFind != aEnd)
{
*aFind = NO_GROUP;