diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-09 16:46:54 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-02-09 16:49:11 +0100 |
commit | 91d798c51d64ac9a4b5eec7c5d84d756f7e9c4f1 (patch) | |
tree | c2dc2416ce3ddc6d3ff36e0704b77db05d2928a9 | |
parent | c7dd72b2bd6a7988e4e1074e9a85222b53ba84ac (diff) |
tdf#115584: fix crash Base
Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=0fb4ae8767fa5ff791cd42934b4215011a269eb0
Change-Id: Ifcf183ebb4d0096193cccdd74a61eb59c7a06cdf
Reviewed-on: https://gerrit.libreoffice.org/49505
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r-- | svtools/source/control/roadmap.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 89ce106d4eb0..dfcf27a44294 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -327,12 +327,17 @@ void ORoadmap::UpdatefollowingHyperLabels(ItemIndex _nIndex) const HL_Vector& rItems = m_pImpl->getHyperLabels(); if ( _nIndex < static_cast<ItemIndex>(rItems.size()) ) { - for (auto const& item : rItems) + for ( HL_Vector::const_iterator i = rItems.begin() + _nIndex; + i != rItems.end(); + ++i, ++_nIndex + ) { - item->SetIndex( _nIndex ); - item->SetPosition( GetPreviousHyperLabel( _nIndex ) ); - ++_nIndex; + RoadmapItem* pItem = *i; + + pItem->SetIndex( _nIndex ); + pItem->SetPosition( GetPreviousHyperLabel( _nIndex ) ); } + } if ( ! m_pImpl->isComplete() ) { |