From d022543be3b0968c4a6851c120b78b289c156e8e Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 15 Nov 2017 18:17:25 +0100 Subject: Catch Gtk::IconThemeError --- src/ui/widget/dock-item.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui/widget/dock-item.cpp') diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index 18ab70eb4..4a06163e1 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -45,7 +45,12 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l int width = 0; int height = 0; Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); - _icon_pixbuf = iconTheme->load_icon(icon_name, width); + try { + _icon_pixbuf = iconTheme->load_icon(icon_name, width); + } + catch (const Gtk::IconThemeError& e) { + std::cerr << "DocItem::DocItem(): " << e.what() << std::endl; + } } if ( _icon_pixbuf ) { -- cgit v1.2.3