diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 09:55:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-03 09:55:36 +0100 |
commit | 3073c015e381c0801d3137295678fecd009bb204 (patch) | |
tree | 9cc43d122051c2b2bca4a1c807815a9e9bb0ffe8 /svtools | |
parent | String->OUString (diff) | |
download | core-3073c015e381c0801d3137295678fecd009bb204.tar.gz core-3073c015e381c0801d3137295678fecd009bb204.zip |
dbgutil deref of empty vector assert
Change-Id: I9c3b4f84df252e632f02e79e069426fafadee0fe
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ruler.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 5740bcb58318..5955d4633354 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 ) |