diff options
Diffstat (limited to 'src/selection-chemistry.cpp')
| -rw-r--r-- | src/selection-chemistry.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index c22ed777b..a3bb9fd77 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -2512,7 +2512,9 @@ void sp_selection_clone(SPDesktop *desktop) Inkscape::XML::Node *clone = xml_doc->createElement("svg:use"); clone->setAttribute("x", "0", false); clone->setAttribute("y", "0", false); - clone->setAttribute("xlink:href", g_strdup_printf("#%s", sel_repr->attribute("id")), false); + gchar *href_str = g_strdup_printf("#%s", sel_repr->attribute("id")); + clone->setAttribute("xlink:href", href_str, false); + g_free(href_str); clone->setAttribute("inkscape:transform-center-x", sel_repr->attribute("inkscape:transform-center-x"), false); clone->setAttribute("inkscape:transform-center-y", sel_repr->attribute("inkscape:transform-center-y"), false); |
