diff options
-rw-r--r-- | src/mainwindow.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 9d2a33d..61156c4 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -111,12 +111,17 @@ static void set_icon_name_fallback(Gtk::Image *i, const char *name, Gtk::IconSiz Gtk::IconSize::lookup(size, width, height); theme = Gtk::IconTheme::get_default(); - pixbuf = theme->load_icon(name, width, Gtk::ICON_LOOKUP_GENERIC_FALLBACK); - if (pixbuf) - i->set(pixbuf); - else + try { + pixbuf = theme->load_icon(name, width, Gtk::ICON_LOOKUP_GENERIC_FALLBACK); + + if (pixbuf) + i->set(pixbuf); + else + i->set(name); + } catch (Gtk::IconThemeError &e) { i->set(name); + } } void MainWindow::updateCard(const pa_card_info &info) { |