projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab809bf
)
add exception handling to Gdk::Pixbuf::create_from_file ()
author
Doug McLain
<doug@nostar.net>
Wed, 5 Dec 2007 08:26:41 +0000
(08:26 +0000)
committer
Doug McLain
<doug@nostar.net>
Wed, 5 Dec 2007 08:26:41 +0000
(08:26 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2748
d708f5d6
-7413-0410-9779-
e7cbd77b26cf
gtk2_ardour/utils.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/utils.cc
b/gtk2_ardour/utils.cc
index 686c8e521c8296c9c3890be3b31a3a69b7039260..8a9325a9409e125f43ff8bf6aa5a98c8a3072a8f 100644
(file)
--- a/
gtk2_ardour/utils.cc
+++ b/
gtk2_ardour/utils.cc
@@
-583,7
+583,20
@@
get_icon (const char* cname)
/*NOTREACHED*/
}
- return Gdk::Pixbuf::create_from_file (path);
+ Glib::RefPtr<Gdk::Pixbuf> img;
+ try {
+ img = Gdk::Pixbuf::create_from_file (path);
+ }
+ catch (const Gdk::PixbufError &e)
+ {
+ cerr << "Caught PixbufError: " << e.what() << endl;
+ }
+ catch (...)
+ {
+ g_message("Caught ... ");
+ }
+
+ return img;
}
string