diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2014-04-02 07:50:04 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2014-04-02 07:50:04 +0000 |
| commit | f6d88348f785616f1872b537616ae84e11d94002 (patch) | |
| tree | 5adab325df725df0e9183a2ea7e113ac1bc1309b /src | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-f6d88348f785616f1872b537616ae84e11d94002.tar.gz inkscape-f6d88348f785616f1872b537616ae84e11d94002.zip | |
Fix for Bug #1297557 (crash if document with linked color profile uses spaces in file name).
Fixed bugs:
- https://launchpad.net/bugs/1297557
(bzr r13249)
Diffstat (limited to 'src')
| -rw-r--r-- | src/color-profile.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp index ed4b9029e..aa0750c00 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -322,17 +322,15 @@ void ColorProfile::set(unsigned key, gchar const *value) { } //# 1. Get complete URI of document gchar const *docbase = doc->getURI(); - if (!docbase) - { - // Normal for files that have not yet been saved. - docbase = ""; - } gchar* escaped = g_uri_escape_string(this->href, "!*'();:@=+$,/?#[]", TRUE); //g_message("docbase:%s\n", docbase); //org::w3c::dom::URI docUri(docbase); - Inkscape::URI docUri(docbase); + Inkscape::URI docUri(""); + if (docbase) { // The file has already been saved + docUri = Inkscape::URI::from_native_filename(docbase); + } //# 2. Get href of icc file. we don't care if it's rel or abs //org::w3c::dom::URI hrefUri(escaped); |
