diff options
author | Daniel Friesel <derf@finalrewind.org> | 2022-10-30 17:18:47 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2022-10-30 17:18:47 +0100 |
commit | 0ffd106e689f7accd78c6f401f7a56d83bd75a97 (patch) | |
tree | c15986a7180b702dc01c739394e5eba173cebb2d /lib | |
parent | 4dbbedaf6bd953e5d57023eefc3acf742e91f511 (diff) |
utilization_icon: handle unknown first/second class utilization
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DBInfoscreen.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/DBInfoscreen.pm b/lib/DBInfoscreen.pm index 83cb77a..836f94e 100644 --- a/lib/DBInfoscreen.pm +++ b/lib/DBInfoscreen.pm @@ -240,7 +240,9 @@ sub startup { $self->helper( 'utilization_icon' => sub { my ( $self, $utilization ) = @_; - my ( $first, $second ) = @{ $utilization // [ 0, 0 ] }; + my ( $first, $second ) = @{ $utilization // [] }; + $first //= 0; + $second //= 0; my $sum = ( $first + $second ) / 2; my @symbols |