]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/OnDestroy.pm
lei add-external: handle interrupts with --mirror
[public-inbox.git] / lib / PublicInbox / OnDestroy.pm
index 0ae4c4c9bd61acd47602ca5543a16ae05784170f..615bc450998beea1e82606db35c0d456450d966b 100644 (file)
@@ -10,7 +10,7 @@ sub new {
 
 sub DESTROY {
        my ($cb, @args) = @{$_[0]};
-       if (!ref($cb)) {
+       if (!ref($cb) && $cb) {
                my $pid = $cb;
                return if $pid != $$;
                $cb = shift @args;