summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx6
-rw-r--r--basegfx/source/polygon/b3dpolypolygon.cxx6
2 files changed, 8 insertions, 4 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index bdd619fb0033..3ec0ed824347 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -84,7 +84,8 @@ public:
{
// add nCount copies of rPolygon
PolygonVector::iterator aIndex(maPolygons.begin());
- aIndex += nIndex;
+ if( nIndex )
+ aIndex += nIndex;
maPolygons.insert(aIndex, nCount, rPolygon);
}
}
@@ -93,7 +94,8 @@ public:
{
// add all polygons from rPolyPolygon
PolygonVector::iterator aIndex(maPolygons.begin());
- aIndex += nIndex;
+ if( nIndex )
+ aIndex += nIndex;
maPolygons.insert(aIndex, rPolyPolygon.begin(), rPolyPolygon.end());
}
diff --git a/basegfx/source/polygon/b3dpolypolygon.cxx b/basegfx/source/polygon/b3dpolypolygon.cxx
index cbd59b6ac362..be1db5e98efb 100644
--- a/basegfx/source/polygon/b3dpolypolygon.cxx
+++ b/basegfx/source/polygon/b3dpolypolygon.cxx
@@ -83,7 +83,8 @@ public:
{
// add nCount copies of rPolygon
PolygonVector::iterator aIndex(maPolygons.begin());
- aIndex += nIndex;
+ if( nIndex )
+ aIndex += nIndex;
maPolygons.insert(aIndex, nCount, rPolygon);
}
}
@@ -92,7 +93,8 @@ public:
{
// add all polygons from rPolyPolygon
PolygonVector::iterator aIndex(maPolygons.begin());
- aIndex += nIndex;
+ if( nIndex )
+ aIndex += nIndex;
maPolygons.insert(aIndex, rPolyPolygon.begin(), rPolyPolygon.end());
}