Kaydet (Commit) f7990b41 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1339306 Using invalid iterator

Change-Id: I72d9b1a2729d455431583177208597c554945629
üst c8b77ecc
...@@ -461,6 +461,9 @@ IMPL_LINK_TYPED( ScTabPageSortFields, SelectHdl, ListBox&, rLb, void ) ...@@ -461,6 +461,9 @@ IMPL_LINK_TYPED( ScTabPageSortFields, SelectHdl, ListBox&, rLb, void )
if ( (*pIter)->m_pLbSort == &rLb ) break; if ( (*pIter)->m_pLbSort == &rLb ) break;
} }
if (pIter == maSortKeyItems.end())
return;
// If not selecting the last Listbox, modify the succeeding ones // If not selecting the last Listbox, modify the succeeding ones
++pIter; ++pIter;
if ( std::distance(maSortKeyItems.begin(), pIter) < nSortKeyCount ) if ( std::distance(maSortKeyItems.begin(), pIter) < nSortKeyCount )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment