summaryrefslogtreecommitdiffstats
path: root/src/object/box3d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/box3d.cpp')
-rw-r--r--src/object/box3d.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/object/box3d.cpp b/src/object/box3d.cpp
index 98dfddbb4..94920e419 100644
--- a/src/object/box3d.cpp
+++ b/src/object/box3d.cpp
@@ -217,9 +217,8 @@ Inkscape::XML::Node* SPBox3D::write(Inkscape::XML::Document *xml_doc, Inkscape::
/* box is not yet linked to a perspective; use the document's current perspective */
SPDocument *doc = object->document;
if (box->persp_ref->getURI()) {
- gchar *uri_string = box->persp_ref->getURI()->toString();
- repr->setAttribute("inkscape:perspectiveID", uri_string);
- g_free(uri_string);
+ auto uri_string = box->persp_ref->getURI()->str();
+ repr->setAttribute("inkscape:perspectiveID", uri_string.c_str());
} else {
Glib::ustring href = "#";
href += doc->getCurrentPersp3D()->getId();