From eadc3832c7d3ad30db8e0a5812384af1157d78ae Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 22 Aug 2008 11:01:36 +0000 Subject: do not crash if an icon is missing (#37651) --- NEWS | 1 + control-center | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 4b2a4414..8bb4ae0a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +- do not crash if an icon is missing (#37651) - stop probing for floppies, which can be slow (#40322) Version 10.21 - 20 August 2008, Thierry Vignaud diff --git a/control-center b/control-center index d23fe4fd..a9adc2bf 100755 --- a/control-center +++ b/control-center @@ -899,7 +899,7 @@ foreach (@tree) { [ 'never', 'automatic' ], # 'none', ), gtkpack__(Gtk2::HBox->new, - Gtk2::Image->new_from_pixbuf(::scale(gtkcreate_pixbuf($icon), -16)), + eval { Gtk2::Image->new_from_pixbuf(::scale(gtkcreate_pixbuf($icon), -16)) }, $labels[$index-1]{widget} = Gtk2::WrappedLabel->new($text), ), ); @@ -1134,7 +1134,7 @@ sub run_tool { $exec .= " --embedded " . $emb_socket->get_id; $wait_darea->show; $cancel->show; - $run_pixbuf = gtkcreate_pixbuf($icon . "_128"); + $run_pixbuf = eval { gtkcreate_pixbuf($icon . "_128") }; $run_counter = 255; $run_counter_add = -5; undef $wait_darea->{color}; -- cgit v1.2.1