summaryrefslogtreecommitdiffstats
path: root/svx
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-01-04 15:27:27 +0100
committerRadek Doulik <rodo@novell.com>2012-01-04 15:29:26 +0100
commit8edd479f579afe9b26790c99a9a6648261aec4e3 (patch)
tree53982aef1fa4d0160df4a4f93ae3f8a82d3f2050 /svx
parentPage Break, Header/Footer: fixed the line color change if config changes (diff)
downloadcore-8edd479f579afe9b26790c99a9a6648261aec4e3.tar.gz
core-8edd479f579afe9b26790c99a9a6648261aec4e3.zip
move the assert checking the polygon count higher
- so that it is called before accessing polygon points
Diffstat (limited to 'svx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 0d9f9a38d73e..f1fbf44a593b 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1643,10 +1643,10 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm
const Point aControl(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
const Point aEnd(GetPoint( seqCoordinates[ rSrcPt++ ], sal_True, sal_True ));
+ DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)");
basegfx::B2DPoint aStartPointB2D( aNewB2DPolygon.getB2DPoint(aNewB2DPolygon.count() - 1 ) );
Point aStartPoint( aStartPointB2D.getX(), aStartPointB2D.getY() );
- DBG_ASSERT(aNewB2DPolygon.count(), "EnhancedCustomShape2d::CreateSubPath: Error in adding control point (!)");
aNewB2DPolygon.appendBezierSegment(
basegfx::B2DPoint(aStartPoint.X() + 2.0*(aControl.X() - aStartPoint.X())/3.0, aStartPoint.Y() + 2.0*(aControl.Y() - aStartPoint.Y())/3.0),
basegfx::B2DPoint(aEnd.X() + 2.0*(aControl.X() - aEnd.X())/3.0, aEnd.Y() + 2.0*(aControl.Y() - aEnd.Y())/3.0),