summaryrefslogtreecommitdiffstats
path: root/src/object/uri-references.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-11-05 22:37:54 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-11-05 22:37:54 +0000
commit8fe8df064850bdaf5cd0c6015430c4b12132c8ab (patch)
tree2ef547a667ff1f1a3ba8fc66dc8350b5ae3c4089 /src/object/uri-references.cpp
parentReplacement for xmlBuildRelativeURI (diff)
downloadinkscape-8fe8df064850bdaf5cd0c6015430c4b12132c8ab.tar.gz
inkscape-8fe8df064850bdaf5cd0c6015430c4b12132c8ab.zip
remove Inkscape::URI::toString
Diffstat (limited to 'src/object/uri-references.cpp')
-rw-r--r--src/object/uri-references.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/object/uri-references.cpp b/src/object/uri-references.cpp
index b4af31278..24bef48aa 100644
--- a/src/object/uri-references.cpp
+++ b/src/object/uri-references.cpp
@@ -120,7 +120,7 @@ void URIReference::attach(const URI &uri)
// createChildDoc() assumes that the referenced file is an SVG.
// PNG and JPG files are allowed (in the case of feImage).
- gchar *filename = uri.toString();
+ gchar const *filename = uri.getPath() ? uri.getPath() : "";
bool skip = false;
if (g_str_has_suffix(filename, ".jpg") || g_str_has_suffix(filename, ".JPG") ||
g_str_has_suffix(filename, ".png") || g_str_has_suffix(filename, ".PNG")) {
@@ -139,10 +139,8 @@ void URIReference::attach(const URI &uri)
}
if (!document) {
g_warning("Can't get document for referenced URI: %s", filename);
- g_free(filename);
return;
}
- g_free(filename);
gchar const *fragment = uri.getFragment();
if (!uri.isRelative() || uri.getQuery() || !fragment) {