summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6bd7fe6)
raw | patch | inline | side by side (parent: 6bd7fe6)
author | theAdib <theAdib@users.sourceforge.net> | |
Sun, 10 May 2009 12:54:49 +0000 (12:54 +0000) | ||
committer | theAdib <theAdib@users.sourceforge.net> | |
Sun, 10 May 2009 12:54:49 +0000 (12:54 +0000) |
src/extension/internal/gdkpixbuf-input.cpp | patch | blob | history | |
src/extension/system.cpp | patch | blob | history |
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index 0acf1648c6c5d1084efb0eca943724f8cf1bed8a..64a099c8a42e3c673b89b3348936c0e4050d6174 100644 (file)
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
index fdebd7b227ded8eaa9c1a5714e521aafbc05b1ef..a7828d3fc115e0bcb291b6e2fea29603c46b68d7 100644 (file)
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
SPDocument *doc = imod->open(filename);
if (!doc) {
- return NULL;
+ throw Input::open_failed();
}
if (last_chance_svg) {