diff options
| author | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-04-04 01:04:51 +0000 |
|---|---|---|
| committer | Liam P. White <inkscapebronyat-signgmaildotcom> | 2014-04-04 01:04:51 +0000 |
| commit | 4007abe02509fc1e312a007fb26f31c5a595df26 (patch) | |
| tree | 1baa70a370188042e52065ccc18723d1404d5de0 /src/live_effects | |
| parent | Update to trunk (diff) | |
| download | inkscape-4007abe02509fc1e312a007fb26f31c5a595df26.tar.gz inkscape-4007abe02509fc1e312a007fb26f31c5a595df26.zip | |
Begin first stage of resolving issue with duplicate knots
(bzr r13090.1.46)
Diffstat (limited to 'src/live_effects')
| -rw-r--r-- | src/live_effects/lpe-taperstroke.cpp | 10 | ||||
| -rw-r--r-- | src/live_effects/pathoutlineprovider.cpp | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp index c452c825c..dc70782c4 100644 --- a/src/live_effects/lpe-taperstroke.cpp +++ b/src/live_effects/lpe-taperstroke.cpp @@ -657,6 +657,11 @@ void KnotHolderEntityAttachBegin::knot_set(Geom::Point const &p, Geom::Point con Geom::Point const s = snap_knot_position(p, state); SPCurve *curve = SP_PATH(item)->get_curve_for_edit(); + if (!curve) { + //oops + lpe->attach_start.param_set_value(0); + return; + } Geom::PathVector pathv = curve->get_pathvector(); Piecewise<D2<SBasis> > pwd2; Geom::Path p_in = return_at_first_cusp(pathv[0]); @@ -678,6 +683,11 @@ void KnotHolderEntityAttachEnd::knot_set(Geom::Point const &p, Geom::Point const Geom::Point const s = snap_knot_position(p, state); SPCurve *curve = SP_PATH(item)->get_curve_for_edit(); + if (!curve) { + //oops + lpe->attach_end.param_set_value(0); + return; + } Geom::PathVector pathv = curve->get_pathvector(); Piecewise<D2<SBasis> > pwd2; Geom::Path p_in = return_at_first_cusp(pathv[0].reverse()); diff --git a/src/live_effects/pathoutlineprovider.cpp b/src/live_effects/pathoutlineprovider.cpp index 56f741417..a696728d6 100644 --- a/src/live_effects/pathoutlineprovider.cpp +++ b/src/live_effects/pathoutlineprovider.cpp @@ -1,3 +1,5 @@ +#include <glib.h> //g_critical
+
#include "pathoutlineprovider.h"
#include "livarot/path-description.h"
#include <2geom/angle.h>
@@ -262,7 +264,7 @@ void extrapolate_curves(Geom::Path& path_builder, Geom::Curve* cbc1, Geom::Curve delete arc1;
arc1 = NULL;
}
- } catch (std::exception ex) {
+ } catch (std::exception & ex) {
printf("Exception occured, probably NaN or infinite valued points: %s\n", ex.what());
path_builder.appendNew<Geom::LineSegment>(endPt);
}
|
