diff options
Diffstat (limited to 'perl/Wallet')
| -rw-r--r-- | perl/Wallet/Server.pm | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/perl/Wallet/Server.pm b/perl/Wallet/Server.pm index 96cff15..e0c0f29 100644 --- a/perl/Wallet/Server.pm +++ b/perl/Wallet/Server.pm @@ -71,7 +71,9 @@ sub error {  # Disconnect the database handle on object destruction to avoid warnings.  sub DESTROY {      my ($self) = @_; -    $self->{dbh}->disconnect unless $self->{dbh}->{InactiveDestroy}; +    if ($self->{dbh} and not $self->{dbh}->{InactiveDestroy}) { +        $self->{dbh}->disconnect; +    }  }  ############################################################################## | 
