diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-12-28 22:34:45 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-12-28 22:34:45 +0000 |
| commit | fb006b59b6d7b6d059dffe3389a829d2213f648d (patch) | |
| tree | da99db26858f0b1fb94bc5d6a61ad778b9290072 /src | |
| parent | Update to trunk (diff) | |
| download | inkscape-fb006b59b6d7b6d059dffe3389a829d2213f648d.tar.gz inkscape-fb006b59b6d7b6d059dffe3389a829d2213f648d.zip | |
Fix crash bug continuing empty paths
(bzr r11950.1.210)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/tools/pen-tool.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/tools/pen-tool.cpp b/src/ui/tools/pen-tool.cpp index ebbc533b8..178a940a2 100644 --- a/src/ui/tools/pen-tool.cpp +++ b/src/ui/tools/pen-tool.cpp @@ -1648,6 +1648,7 @@ static void bspline_spiro_end_anchor_on(PenTool *const pc) Geom::Point C(0,0); if(!pc->sa || pc->sa->curve->is_empty()){ tmpCurve = pc->green_curve->create_reverse(); + if(pc->green_curve->get_segment_count()==0)return; Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmpCurve->last_segment()); if(pc->bspline){ C = tmpCurve->last_segment()->finalPoint() + (1./3)*(tmpCurve->last_segment()->initialPoint() - tmpCurve->last_segment()->finalPoint()); @@ -1715,6 +1716,7 @@ static void bspline_spiro_end_anchor_off(PenTool *const pc) SPCurve *lastSeg = new SPCurve(); if(!pc->sa || pc->sa->curve->is_empty()){ tmpCurve = pc->green_curve->create_reverse(); + if(pc->green_curve->get_segment_count()==0)return; Geom::CubicBezier const * cubic = dynamic_cast<Geom::CubicBezier const*>(&*tmpCurve->last_segment()); if(cubic){ lastSeg->moveto((*cubic)[0]); |
