diff options
| author | theAdib <theAdib@users.sourceforge.net> | 2009-05-10 12:54:49 +0000 |
|---|---|---|
| committer | theAdib <theAdib@users.sourceforge.net> | 2009-05-10 12:54:49 +0000 |
| commit | 58602a1742c3f7d493371204bc2c4b4818670fc9 (patch) | |
| tree | 1c838d20237ce392ffe7d9c609b72cc255d95421 /src | |
| parent | Remove test-stubs.cpp: no longer needed. (diff) | |
| download | inkscape-58602a1742c3f7d493371204bc2c4b4818670fc9.tar.gz inkscape-58602a1742c3f7d493371204bc2c4b4818670fc9.zip | |
BUG 218090 opening of bitmap fails, now error message
(bzr r7844)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 3 | ||||
| -rw-r--r-- | src/extension/system.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index 0acf1648c..64a099c8a 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -19,10 +19,11 @@ namespace Internal { SPDocument * GdkpixbufInput::open(Inkscape::Extension::Input */*mod*/, char const *uri) { - SPDocument *doc = sp_document_new(NULL, TRUE, TRUE); + SPDocument *doc = NULL; GdkPixbuf *pb = Inkscape::IO::pixbuf_new_from_file( uri, NULL ); if (pb) { /* We are readable */ + doc = sp_document_new(NULL, TRUE, TRUE); bool saved = sp_document_get_undo_sensitive(doc); sp_document_set_undo_sensitive(doc, false); // no need to undo in this temporary document diff --git a/src/extension/system.cpp b/src/extension/system.cpp index fdebd7b22..a7828d3fc 100644 --- a/src/extension/system.cpp +++ b/src/extension/system.cpp @@ -93,7 +93,7 @@ open(Extension *key, gchar const *filename) SPDocument *doc = imod->open(filename); if (!doc) { - return NULL; + throw Input::open_failed(); } if (last_chance_svg) { |
