svtools/source/control/roadmap.cxx |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 91d798c51d64ac9a4b5eec7c5d84d756f7e9c4f1
Author: Julien Nabet <serval2...@yahoo.fr>
Date:   Fri Feb 9 16:46:54 2018 +0100

    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 <serval2...@yahoo.fr>
    Tested-by: Julien Nabet <serval2...@yahoo.fr>

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() )
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to