i2ptunnel: Fix NPE stopping TCG

This commit is contained in:
zzz
2018-01-16 00:26:32 +00:00
parent c2bfb80233
commit 889b5ae280

View File

@@ -881,8 +881,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
@Override
public synchronized boolean destroy() {
close(true);
if (_ownDest)
sockMgr.destroySocketManager();
if (_ownDest) {
I2PSocketManager sm = sockMgr;
if (sm != null)
sm.destroySocketManager();
}
return true;
}