summaryrefslogtreecommitdiffstats
path: root/src/object/sp-gradient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/sp-gradient.cpp')
-rw-r--r--src/object/sp-gradient.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/object/sp-gradient.cpp b/src/object/sp-gradient.cpp
index c8e7f92b0..9aee288be 100644
--- a/src/object/sp-gradient.cpp
+++ b/src/object/sp-gradient.cpp
@@ -629,9 +629,8 @@ Inkscape::XML::Node *SPGradient::write(Inkscape::XML::Document *xml_doc, Inkscap
}
if (this->ref->getURI()) {
- gchar *uri_string = this->ref->getURI()->toString();
- repr->setAttribute("xlink:href", uri_string);
- g_free(uri_string);
+ auto uri_string = this->ref->getURI()->str();
+ repr->setAttribute("xlink:href", uri_string.c_str());
}
if ((flags & SP_OBJECT_WRITE_ALL) || this->units_set) {