summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/parameter/path.cpp7
-rw-r--r--src/sp-object.cpp15
-rw-r--r--src/ui/tool/path-manipulator.cpp2
3 files changed, 14 insertions, 10 deletions
diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp
index e0369e662..7ea1d465c 100644
--- a/src/live_effects/parameter/path.cpp
+++ b/src/live_effects/parameter/path.cpp
@@ -294,7 +294,12 @@ void
PathParam::set_new_value (Geom::PathVector const &newpath, bool write_to_svg)
{
remove_link();
- _pathvector = newpath;
+ if (newpath.empty()) {
+ param_set_and_write_default();
+ return;
+ } else {
+ _pathvector = newpath;
+ }
must_recalculate_pwd2 = true;
if (write_to_svg) {
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index db66eb3e6..7dbc51b84 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -958,16 +958,15 @@ void SPObject::readAttr(gchar const *key)
//g_assert(object != NULL);
//g_assert(SP_IS_OBJECT(object));
g_assert(key != NULL);
-
//XML Tree being used here.
- g_assert(this->getRepr() != NULL);
+ if (this->getRepr() != NULL ) {
+ unsigned int keyid = sp_attribute_lookup(key);
+ if (keyid != SP_ATTR_INVALID) {
+ /* Retrieve the 'key' attribute from the object's XML representation */
+ gchar const *value = this->getRepr()->attribute(key);
- unsigned int keyid = sp_attribute_lookup(key);
- if (keyid != SP_ATTR_INVALID) {
- /* Retrieve the 'key' attribute from the object's XML representation */
- gchar const *value = getRepr()->attribute(key);
-
- setKeyValue(keyid, value);
+ setKeyValue(keyid, value);
+ }
}
}
diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp
index f4790c317..3b25439f3 100644
--- a/src/ui/tool/path-manipulator.cpp
+++ b/src/ui/tool/path-manipulator.cpp
@@ -1492,7 +1492,6 @@ void PathManipulator::_getGeometry()
void PathManipulator::_setGeometry()
{
using namespace Inkscape::LivePathEffect;
- if (empty()) return;
if (!_lpe_key.empty()) {
// copied from nodepath.cpp
@@ -1505,6 +1504,7 @@ void PathManipulator::_setGeometry()
LIVEPATHEFFECT(_path)->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
} else {
+ if (empty()) return;
//XML Tree being used here directly while it shouldn't be.
if (_path->getRepr()->attribute("inkscape:original-d"))
_path->set_original_curve(_spcurve, false, false);