From 23551aa675eb5966b8135e8797243364e709965f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 20 Jan 2012 17:14:55 +0100 Subject: [PATCH] =?utf8?q?AM::convert=5Funit=20-=20wenn=20keine=20units=20?= =?utf8?q?=C3=BCbergeben,=20alle=20laden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AM.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SL/AM.pm b/SL/AM.pm index df8bf23e5..891e5f87c 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1509,6 +1509,10 @@ sub convert_unit { $main::lxdebug->enter_sub(2); my ($this, $a, $b, $all_units) = @_; + if (!$all_units) { + $all_units = $this->retrieve_all_units; + } + $main::lxdebug->leave_sub(2) and return 0 unless $a && $b; $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a} && $all_units->{$b}; $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a}{base_unit} eq $all_units->{$b}{base_unit}; -- 2.20.1