diff options
| author | root <root@jtx.marker.es> | 2013-10-05 00:49:20 +0000 |
|---|---|---|
| committer | root <root@jtx.marker.es> | 2013-10-05 00:49:20 +0000 |
| commit | 0de4a7013187366efbeeb5887191b6ea57445899 (patch) | |
| tree | 4403a23f086824c3f43a0d60853e625f5ce5c635 /src/ui/tool/path-manipulator.cpp | |
| parent | update to trunk (diff) | |
| parent | C++ (diff) | |
| download | inkscape-0de4a7013187366efbeeb5887191b6ea57445899.tar.gz inkscape-0de4a7013187366efbeeb5887191b6ea57445899.zip | |
update to trunk
(bzr r11950.1.159)
Diffstat (limited to 'src/ui/tool/path-manipulator.cpp')
| -rw-r--r-- | src/ui/tool/path-manipulator.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 10e50a970..f72313315 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -222,7 +222,7 @@ void PathManipulator::writeXML() sp_object_ref(_path); _path->deleteObject(true, true); sp_object_unref(_path); - _path = 0; + _path = NULL; } _observer->unblock(); } @@ -1317,8 +1317,9 @@ void PathManipulator::_createGeometryFromControlPoints(bool alert_LPE) Geom::PathVector pathv = builder.peek() * (_edit_transform * _i2d_transform).inverse(); _spcurve->set_pathvector(pathv); if (alert_LPE) { + /// \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 = sp_lpe_item_get_effect_list(_path); + 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); @@ -1419,6 +1420,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(); + } } } |
