diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-02-13 14:37:56 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-02-13 14:37:56 +0000 |
commit | aa48292e34c25eca154646160a329d71910d84d4 (patch) | |
tree | eae8b268f804256bcc68c99267588294aef3b5c5 | |
parent | 8bcf70f6d86e80b5e98dca869e310c9adb502485 (diff) | |
download | rpmdrake-aa48292e34c25eca154646160a329d71910d84d4.tar rpmdrake-aa48292e34c25eca154646160a329d71910d84d4.tar.gz rpmdrake-aa48292e34c25eca154646160a329d71910d84d4.tar.bz2 rpmdrake-aa48292e34c25eca154646160a329d71910d84d4.tar.xz rpmdrake-aa48292e34c25eca154646160a329d71910d84d4.zip |
(get_icon) do not crash when a icon is missing (#37700)
-rw-r--r-- | Rpmdrake/icon.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Rpmdrake/icon.pm b/Rpmdrake/icon.pm index e069be5f..52ebe3ee 100644 --- a/Rpmdrake/icon.pm +++ b/Rpmdrake/icon.pm @@ -187,9 +187,9 @@ sub get_icon { my ($group, $parent) = @_; my $pixbuf; my $path = $group =~ /\|/ ? '/usr/share/icons/mini/' : '/usr/share/icons/'; - my $create_pixbuf = sub { gtknew('Pixbuf', file => join('', $path, $_[0], '.png')) }; - eval { $pixbuf = $create_pixbuf->($group_icons{$group}) }; - eval { $pixbuf ||= $create_pixbuf->($group_icons{$parent}) } if $parent; + my $create_pixbuf = sub { eval { gtknew('Pixbuf', file => join('', $path, $_[0], '.png')) } }; + $pixbuf = $create_pixbuf->($group_icons{$group}); + $pixbuf ||= $create_pixbuf->($group_icons{$parent}) if $parent; $pixbuf ||= $create_pixbuf->('applications_section'); } |