[Libreoffice-commits] core.git: svtools/source

Caolán McNamara caolanm at redhat.com
Tue Sep 3 01:55:57 PDT 2013


 svtools/source/control/ruler.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3073c015e381c0801d3137295678fecd009bb204
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 3 09:55:30 2013 +0100

    dbgutil deref of empty vector assert
    
    Change-Id: I9c3b4f84df252e632f02e79e069426fafadee0fe

diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 5740bcb..5955d46 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -2685,15 +2685,15 @@ void Ruler::SetLines( sal_uInt32 aLineArraySize, const RulerLine* pLineArray )
     if ( mpData->pLines.size() == aLineArraySize )
     {
         sal_uInt32           i = aLineArraySize;
-        const RulerLine* pAry1 = &mpData->pLines[0];
+        vector<RulerLine>::const_iterator aItr1 = mpData->pLines.begin();
         const RulerLine* pAry2 = pLineArray;
         while ( i )
         {
-            if ( (pAry1->nPos   != pAry2->nPos)   ||
-                 (pAry1->nStyle != pAry2->nStyle) )
+            if ( (aItr1->nPos   != pAry2->nPos)   ||
+                 (aItr1->nStyle != pAry2->nStyle) )
                 break;
-            pAry1++;
-            pAry2++;
+            ++aItr1;
+            ++pAry2;
             i--;
         }
         if ( !i )


More information about the Libreoffice-commits mailing list