summaryrefslogtreecommitdiffstats
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
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)
-rw-r--r--NEWS3
-rwxr-xr-xmdkapplet4
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index fa08e55f..b7e36e6e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- mdkapplet
+ o do not crash if image cannot be loaded (#44750)
+
Version 2.55 - 10 October 2008
- mdkapplet
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));