mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-21 22:26:29 +01:00
add exception handling to Gdk::Pixbuf::create_from_file ()
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2748 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ab809bf30c
commit
7c0ff18a62
1 changed files with 14 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue