diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-10-05 00:53:12 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-10-05 00:53:12 +0000 |
| commit | 995c8028b521eb7d17334e6f6d34bbb54949a48b (patch) | |
| tree | 6d2e811cfbfe459d31edfd9234bdda8bab57788b /src/ui/tool/path-manipulator.cpp | |
| parent | update to trunk (diff) | |
| parent | C++ (diff) | |
| download | inkscape-995c8028b521eb7d17334e6f6d34bbb54949a48b.tar.gz inkscape-995c8028b521eb7d17334e6f6d34bbb54949a48b.zip | |
update to trunk
(bzr r12588.1.11)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index b775c0637..d12e2958b 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -203,7 +203,7 @@ void PathManipulator::writeXML() sp_object_ref(_path); _path->deleteObject(true, true); sp_object_unref(_path); - _path = 0; + _path = NULL; } _observer->unblock(); } @@ -1206,8 +1206,9 @@ void PathManipulator::_createGeometryFromControlPoints(bool alert_LPE) Geom::PathVector pathv = builder.peek() * (_edit_transform * _i2d_transform).inverse(); _spcurve->set_pathvector(pathv); if (alert_LPE) { - if (_path->hasPathEffect()) { - PathEffectList effect_list = sp_lpe_item_get_effect_list(_path); + /// \todo note that _path can be an Inkscape::LivePathEffect::Effect* too, kind of confusing, rework member naming? + if (SP_IS_LPE_ITEM(_path) && _path->hasPathEffect()) { + PathEffectList effect_list = _path->getEffectList(); LivePathEffect::LPEPowerStroke *lpe_pwr = dynamic_cast<LivePathEffect::LPEPowerStroke*>( effect_list.front()->lpeobject->get_lpe() ); if (lpe_pwr) { lpe_pwr->adjustForNewPath(pathv); @@ -1309,6 +1310,10 @@ void PathManipulator::_getGeometry() } else { _spcurve->unref(); _spcurve = _path->get_curve_for_edit(); + // never allow NULL to sneak in here! + if (_spcurve == NULL) { + _spcurve = new SPCurve(); + } } } |
