summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-10-10 22:18:48 +0000
committerThierry Vignaud <tv@mandriva.org>2008-10-10 22:18:48 +0000
commitf269b86204b522564e43aba98a03e660d4f1a155 (patch)
tree88d7b54cd285e26c37b04fbf14edae34acce49c7 /mdkapplet
parent5057339688e895a09168d4d830663656aeb06568 (diff)
downloadmgaonline-f269b86204b522564e43aba98a03e660d4f1a155.tar
mgaonline-f269b86204b522564e43aba98a03e660d4f1a155.tar.gz
mgaonline-f269b86204b522564e43aba98a03e660d4f1a155.tar.bz2
mgaonline-f269b86204b522564e43aba98a03e660d4f1a155.tar.xz
mgaonline-f269b86204b522564e43aba98a03e660d4f1a155.zip
(setState) do not crash if image cannot be loaded (#44750)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet4
1 files changed, 2 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index c1ad3996..cee3cce3 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -657,8 +657,8 @@ sub setState {
my $checkme;
state $previous_state;
my @arr = @{$state{$state}{menu}};
- my $tmp = gtkcreate_pixbuf($state{$state}{colour}[0]);
- $icon->set_from_pixbuf($tmp);
+ my $tmp = eval { gtkcreate_pixbuf($state{$state}{colour}[0]) };
+ $icon->set_from_pixbuf($tmp) if $tmp;
$icon->set_tooltip(formatAlaTeX(translate($state{$state}{tt}[0])));
my @invisible_states = qw(delayed okay disconnected locked);
$icon->set_visible(!member($state, @invisible_states));