X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/c696ba272784e16fbac7e3e9a09f2e18eb469217..23551aa675eb5966b8135e8797243364e709965f:/SL/AM.pm 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};