Commit 8fd705fb authored by Nathan Lee's avatar Nathan Lee
Browse files

Fix crash copying Attach Path LPE object

Fix inkscape/inkscape#626
parent 864af093
Pipeline #522312832 passed with stages
in 152 minutes and 31 seconds
......@@ -163,19 +163,18 @@ PathParam::param_readSVGValue(const gchar * strvalue)
if (strvalue[0] == '#') {
bool write = false;
SPObject * old_ref = param_effect->getSPDoc()->getObjectByHref(strvalue);
Glib::ustring id_tmp;
if (old_ref) {
SPObject * successor = old_ref->_successor;
Glib::ustring id = strvalue;
if (successor) {
id = successor->getId();
id.insert(id.begin(), '#');
id_tmp = successor->getId();
id_tmp.insert(id_tmp.begin(), '#');
write = true;
}
strvalue = id.c_str();
}
if (href)
g_free(href);
href = g_strdup(strvalue);
href = g_strdup(id_tmp.empty() ? strvalue : id_tmp.c_str());
// Now do the attaching, which emits the changed signal.
try {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment