coverity#705112 Using invalid iterator
Change-Id: I6d05e418436b9d0b12be977b7842e1230ba3c7b1
This commit is contained in:
@@ -772,11 +772,14 @@ void OFieldExpressionControl::DeleteRows()
|
||||
m_pParent->m_pController->executeChecked(SID_GROUP_REMOVE,aArgs);
|
||||
|
||||
::std::vector<sal_Int32>::iterator aFind = ::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos);
|
||||
*aFind = NO_GROUP;
|
||||
::std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end();
|
||||
for(++aFind;aFind != aEnd;++aFind)
|
||||
if ( *aFind != NO_GROUP )
|
||||
--*aFind;
|
||||
if (aFind != m_aGroupPositions.end())
|
||||
{
|
||||
*aFind = NO_GROUP;
|
||||
::std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end();
|
||||
for(++aFind;aFind != aEnd;++aFind)
|
||||
if ( *aFind != NO_GROUP )
|
||||
--*aFind;
|
||||
}
|
||||
}
|
||||
nIndex = NextSelectedRow();
|
||||
}
|
||||
|
Reference in New Issue
Block a user