From 05f2e3cabd68bf13c68ecd39946e058b01420d8a Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 6 Jul 2017 12:43:23 +0200 Subject: Remove more checks if icon exists in default theme. --- src/ui/widget/dock-item.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (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 60ea03fb7..18ab70eb4 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -42,12 +42,10 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l if (!icon_name.empty()) { Glib::RefPtr iconTheme = Gtk::IconTheme::get_default(); - if ( iconTheme->has_icon(icon_name) ) { - int width = 0; - int height = 0; - Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); - _icon_pixbuf = iconTheme->load_icon(icon_name, width); - } + int width = 0; + int height = 0; + Gtk::IconSize::lookup(Gtk::ICON_SIZE_MENU, width, height); + _icon_pixbuf = iconTheme->load_icon(icon_name, width); } if ( _icon_pixbuf ) { -- cgit v1.2.3