diff --git a/plugins/rtorrent/rtom_allsessions_vol b/plugins/rtorrent/rtom_allsessions_vol index d067fde7..37b8a10e 100755 --- a/plugins/rtorrent/rtom_allsessions_vol +++ b/plugins/rtorrent/rtom_allsessions_vol @@ -104,9 +104,12 @@ sub rtorrent_version_lower_than { } close (SOCK); } - return version->parse($rtorrent_version) < version->parse($_[0]); + if(defined $_[0]){ + return version->parse($rtorrent_version) < version->parse($_[0]); + } } - +# init rtorrent_version +rtorrent_version_lower_than(); my $pattern = qr/([A-Z0-9]+)<\/string><\/value>/; diff --git a/plugins/rtorrent/rtom_vol b/plugins/rtorrent/rtom_vol index e121aa39..1ea5678f 100755 --- a/plugins/rtorrent/rtom_vol +++ b/plugins/rtorrent/rtom_vol @@ -106,8 +106,12 @@ sub rtorrent_version_lower_than { } close (SOCK); } - return version->parse($rtorrent_version) < version->parse($_[0]); + if(defined $_[0]){ + return version->parse($rtorrent_version) < version->parse($_[0]); + } } +# init rtorrent_version +rtorrent_version_lower_than(); my $pattern = qr/([A-Z0-9]+)<\/string><\/value>/;