summaryrefslogtreecommitdiff
path: root/tools/source/generic
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source/generic')
-rw-r--r--tools/source/generic/poly.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 21024f081383..5cca29b3066e 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1004,8 +1004,8 @@ void Polygon::GetSimple( Polygon& rResult ) const
rResult = Polygon( (USHORT)aPointVector.size() );
::std::vector< Point >::iterator aIter( aPointVector.begin() ), aEnd( aPointVector.end() );
Point* pPointArray = rResult.mpImplPolygon->mpPointAry;
-
- while( aIter != aEnd )
+ USHORT nPoints = rResult.mpImplPolygon->mnPoints;
+ while( nPoints-- && aIter != aEnd )
*pPointArray++ = *aIter++;
}
}