summaryrefslogtreecommitdiffstats
path: root/src/io/uristream.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2018-10-18 15:09:11 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2018-10-18 15:09:11 +0000
commitddda572b1c44d4f621bd73ade0d283a281e2aed9 (patch)
tree176b569a345b91cd7c16efbae85c69845b5543c5 /src/io/uristream.cpp
parentRenamed "Outline thin strokes" to "visible hairlines" to make the intent clea... (diff)
parentNulling pointer after destroying its data. (diff)
downloadinkscape-ddda572b1c44d4f621bd73ade0d283a281e2aed9.tar.gz
inkscape-ddda572b1c44d4f621bd73ade0d283a281e2aed9.zip
Merge branch 'master' of gitlab.com:xhorak/inkscape
Diffstat (limited to 'src/io/uristream.cpp')
-rw-r--r--src/io/uristream.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/io/uristream.cpp b/src/io/uristream.cpp
index ff4cca74d..9fd0d9c96 100644
--- a/src/io/uristream.cpp
+++ b/src/io/uristream.cpp
@@ -321,11 +321,14 @@ UriOutputStream::UriOutputStream(Inkscape::URI &destination)
//printf("out path:'%s'\n", cpath);
outf = fopen_utf8name(cpath, FILE_WRITE);
//outf = fopen(cpath, "wb");
- g_free(cpath);
+
if (!outf) {
Glib::ustring err = "UriOutputStream cannot open file ";
err += cpath;
+ g_free(cpath);
throw StreamException(err);
+ } else {
+ g_free(cpath);
}
break;