Fix nullpointer

A Nullpointer can happen if app get shut down very early.
This commit is contained in:
chimp1984 2020-12-19 15:37:02 -05:00
parent e2c8e4dff6
commit d24d05d08d
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -184,7 +184,9 @@ public class TorNetworkNode extends NetworkNode {
log.info("Tor shut down completed");
} else {
log.info("Tor has not been created yet. We cancel the torStartupFuture.");
torStartupFuture.cancel(true);
if (torStartupFuture != null) {
torStartupFuture.cancel(true);
}
log.info("torStartupFuture cancelled");
}
} catch (Throwable e) {