Handle IO errors in icon setting code

If gtk cannot load the file, it may throw a Gio::Error. In that case
fall back to setting the name.

BugLink: https://bugs.debian.org/765725
This commit is contained in:
Felipe Sateler 2014-10-22 20:48:29 -03:00 committed by Tanu Kaskinen
parent c71e9d5b51
commit f2e32ea305
1 changed files with 2 additions and 0 deletions

View File

@ -251,6 +251,8 @@ static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSiz
i->set(name); i->set(name);
} catch (Gtk::IconThemeError &e) { } catch (Gtk::IconThemeError &e) {
i->set(name); i->set(name);
} catch (Gio::Error &e) {
i->set(name);
} }
} }