summaryrefslogtreecommitdiffstats
path: root/src/live_effects/pathoutlineprovider.cpp
diff options
context:
space:
mode:
authorLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-02 21:33:37 +0000
committerLiam P. White <inkscapebronyat-signgmaildotcom>2014-04-02 21:33:37 +0000
commitb7c026006efcc5461dcef0f3c9a5e1b87d162d3d (patch)
treec5a137a0a068ae0c2beb1aee84ab00b65527594d /src/live_effects/pathoutlineprovider.cpp
parentClean up code (diff)
downloadinkscape-b7c026006efcc5461dcef0f3c9a5e1b87d162d3d.tar.gz
inkscape-b7c026006efcc5461dcef0f3c9a5e1b87d162d3d.zip
Hopefully remove the last of the exception throwing with certain path effects
(bzr r13090.1.43)
Diffstat (limited to 'src/live_effects/pathoutlineprovider.cpp')
-rw-r--r--src/live_effects/pathoutlineprovider.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/live_effects/pathoutlineprovider.cpp b/src/live_effects/pathoutlineprovider.cpp
index ad39a7416..56f741417 100644
--- a/src/live_effects/pathoutlineprovider.cpp
+++ b/src/live_effects/pathoutlineprovider.cpp
@@ -250,17 +250,21 @@ void extrapolate_curves(Geom::Path& path_builder, Geom::Curve* cbc1, Geom::Curve
}
Geom::EllipticalArc *arc0 = circle1.arc(cbc1->finalPoint(), 0.5*(cbc1->finalPoint()+sol), sol, true);
Geom::EllipticalArc *arc1 = circle2.arc(sol, 0.5*(sol+endPt), endPt, true);
+ try {
+ if (arc0) {
+ path_builder.append (arc0->toSBasis());
+ delete arc0;
+ arc0 = NULL;
+ }
- if (arc0) {
- path_builder.append (arc0->toSBasis());
- delete arc0;
- arc0 = NULL;
- }
-
- if (arc1) {
- path_builder.append (arc1->toSBasis());
- delete arc1;
- arc1 = NULL;
+ if (arc1) {
+ path_builder.append (arc1->toSBasis());
+ delete arc1;
+ arc1 = NULL;
+ }
+ } catch (std::exception ex) {
+ printf("Exception occured, probably NaN or infinite valued points: %s\n", ex.what());
+ path_builder.appendNew<Geom::LineSegment>(endPt);
}
} else {
boost::optional <Geom::Point> p = intersection_point (cbc1->finalPoint(), tang1,