diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2014-03-18 18:30:41 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2014-03-18 18:30:41 +0000 |
| commit | bb21b145819e999294e711058b26d97e0527a646 (patch) | |
| tree | a106db30d7eab36f639cc507418328b866c060f4 /src | |
| parent | Fix weighted removal of attributes from style in merge extension. (diff) | |
| download | inkscape-bb21b145819e999294e711058b26d97e0527a646.tar.gz inkscape-bb21b145819e999294e711058b26d97e0527a646.zip | |
Fix for Bug #1291546 (Linking color profile from Document properties dialog crashes Inkscape).
Fixed bugs:
- https://launchpad.net/bugs/1291546
(bzr r13165)
Diffstat (limited to 'src')
| -rw-r--r-- | src/color-profile.cpp | 2 | ||||
| -rw-r--r-- | src/uri.cpp | 3 |
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] != '/') { |
