diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-14 13:00:36 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-14 13:24:58 +0000 |
commit | f7990b41817df73bb6e96777796a152535cad3c6 (patch) | |
tree | 222887821af2b5be75045ad099494b0168f19f93 /sc | |
parent | c8b77ecc6d3d910578223055fa88937e2b9a5bc7 (diff) |
coverity#1339306 Using invalid iterator
Change-Id: I72d9b1a2729d455431583177208597c554945629
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/dbgui/tpsort.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 3367c50b8440..522bc0eec4d2 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -461,6 +461,9 @@ IMPL_LINK_TYPED( ScTabPageSortFields, SelectHdl, ListBox&, rLb, void ) if ( (*pIter)->m_pLbSort == &rLb ) break; } + if (pIter == maSortKeyItems.end()) + return; + // If not selecting the last Listbox, modify the succeeding ones ++pIter; if ( std::distance(maSortKeyItems.begin(), pIter) < nSortKeyCount ) |