summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a26f383)
raw | patch | inline | side by side (parent: a26f383)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Dec 2007 16:32:23 +0000 (16:32 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Dec 2007 16:32:23 +0000 (16:32 +0000) |
src/display/nr-filter-image.cpp | patch | blob | history |
index 312e854045e17ec5e0a42aebcc5a3faf84ccc2bf..2d32cc51abac4443f3e70e5aebb841982a5337e8 100644 (file)
if (!feImageHref) return 0;
if (!image_pixbuf){
- if ( (image = Gdk::Pixbuf::create_from_file(feImageHref)) < 0 ) return 0;
- width = image->get_width();
- height = image->get_height();
- rowstride = image->get_rowstride();
- image_pixbuf = image->get_pixels();
+ try {
+ image = Gdk::Pixbuf::create_from_file(feImageHref);
+ }
+ catch (const Glib::FileError & e)
+ {
+ g_warning("caught Glib::FileError in FilterImage::render");
+ return 0;
+ }
+ catch (const Gdk::PixbufError & e)
+ {
+ g_warning("Gdk::PixbufError in FilterImage::render");
+ return 0;
+ }
+ if ( !image ) return 0;
+
+ width = image->get_width();
+ height = image->get_height();
+ rowstride = image->get_rowstride();
+ image_pixbuf = image->get_pixels();
}
int w,x,y;
NRPixBlock *in = slot.get(_input);