summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/dock-item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/dock-item.cpp')
-rw-r--r--src/ui/widget/dock-item.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp
index 12a0686f0..147bd818d 100644
--- a/src/ui/widget/dock-item.cpp
+++ b/src/ui/widget/dock-item.cpp
@@ -52,8 +52,15 @@ DockItem::DockItem(Dock& dock, const Glib::ustring& name, const Glib::ustring& l
sp_icon_fetch_pixbuf(sp_icon);
_icon_pixbuf = Glib::wrap(sp_icon->pb, true);
} else if ( GTK_IS_IMAGE(icon->gobj()) ) {
- _icon_pixbuf = Gtk::Invisible().render_icon(Gtk::StockID(icon_name),
- Gtk::ICON_SIZE_MENU);
+ GtkStockItem stock;
+ if ( gtk_stock_lookup( icon_name.c_str(), &stock ) ) {
+ _icon_pixbuf = Gtk::Invisible().render_icon( Gtk::StockID(icon_name),
+ Gtk::ICON_SIZE_MENU );
+ } else {
+ // TODO re-work this properly. Anti-crasher "null" icon for the moment
+ _icon_pixbuf = Gtk::Invisible().render_icon( Gtk::StockID(GTK_STOCK_MISSING_IMAGE),
+ Gtk::ICON_SIZE_MENU );
+ }
}
delete icon;