summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e9ea25)
raw | patch | inline | side by side (parent: 8e9ea25)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 8 Nov 2007 00:44:47 +0000 (00:44 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Thu, 8 Nov 2007 00:44:47 +0000 (00:44 +0000) |
src/ui/dialog/filedialogimpl-gtkmm.cpp | patch | blob | history |
index 6ad7179383abfd59df45d4311be59953a7c42b26..ecedd8b8f826ad23d1b8caf0763afccececf0310 100644 (file)
gint previewHeight = 600;
//Get some image info. Smart pointer does not need to be deleted
- Glib::RefPtr<Gdk::Pixbuf> img = Gdk::Pixbuf::create_from_file(fileName);
+ Glib::RefPtr<Gdk::Pixbuf> img(NULL);
+ try {
+ img = Gdk::Pixbuf::create_from_file(fileName);
+ }
+ catch (Glib::FileError e)
+ {
+ g_message("caught Glib::FileError in SVGPreview::showImage");
+ return;
+ }
+ catch (Gdk::PixbufError e)
+ {
+ g_message("Gdk::PixbufError in SVGPreview::showImage");
+ return;
+ }
+
gint imgWidth = img->get_width();
gint imgHeight = img->get_height();