diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-01-27 22:03:02 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-01-27 22:03:02 +0000 |
| commit | 5b962cdfdae8e7fee34211f7da4146eba5d763f9 (patch) | |
| tree | 7ca839f8b4e6f2e67ed86915ba61641c0a10d714 /src/xml/repr-io.cpp | |
| parent | update to trunk (diff) | |
| parent | Protect pdf and png exports from failure and output reasonalbe warnings. (diff) | |
| download | inkscape-5b962cdfdae8e7fee34211f7da4146eba5d763f9.tar.gz inkscape-5b962cdfdae8e7fee34211f7da4146eba5d763f9.zip | |
update to trunk
(bzr r11950.1.237)
Diffstat (limited to 'src/xml/repr-io.cpp')
| -rw-r--r-- | src/xml/repr-io.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 54eff00bc..0319bb5e3 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -334,7 +334,10 @@ Document *sp_repr_read_file (const gchar * filename, const gchar *default_ns) xmlSubstituteEntitiesDefault(1); g_return_val_if_fail (filename != NULL, NULL); - g_return_val_if_fail (Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS ), NULL); + if (!Inkscape::IO::file_test( filename, G_FILE_TEST_EXISTS )) { + g_warning("Can't open file: %s (doesn't exist)", filename); + return NULL; + } /* fixme: A file can disappear at any time, including between now and when we actually try to * open it. Get rid of the above test once we're sure that we correctly handle * non-existence. */ |
