summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/color-profile.cpp2
-rw-r--r--src/uri.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 09eaa36e5..ed4b9029e 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -339,7 +339,7 @@ void ColorProfile::set(unsigned key, gchar const *value) {
Inkscape::URI hrefUri(escaped);
//# 3. Resolve the href according the docBase. This follows
// the w3c specs. All absolute and relative issues are considered
- std::string fullpath = docUri.getFullPath(hrefUri.getFullPath(""));
+ std::string fullpath = hrefUri.getFullPath(docUri.getFullPath(""));
gchar* fullname = g_uri_unescape_string(fullpath.c_str(), "");
this->impl->_clearProfile();
diff --git a/src/uri.cpp b/src/uri.cpp
index e81d108c9..2eaf4ecc1 100644
--- a/src/uri.cpp
+++ b/src/uri.cpp
@@ -149,6 +149,9 @@ gchar *URI::to_native_filename(gchar const* uri) throw(BadURIException)
* and thus redundent. Caller is expected to check against the document's path.
*/
const std::string URI::getFullPath(std::string const base) const {
+ if (!_impl->getPath()) {
+ return "";
+ }
std::string path = std::string(_impl->getPath());
// Calculate the absolute path from an available base
if(!base.empty() && !path.empty() && path[0] != '/') {